lanzhusiyu 2016-06-30
css div水平居中
container 是父div
如何让container中的div相对于container水平居中呢?
 方法:
(1)父div container定宽(设置父div的宽度,当然宽度必须保证大于子div的宽度)
(2)设置父div css样式:
.container {
    width: 500px;
    margin: 0 auto;
}(3)子div 设置position 为relative
background-color: blue;background-color: yellow;<input type="button" value="变蓝" @click="changeColorT