不知为什么会居左,如何让其居中
代码如下:
——————————
@media screen and (max-width: 600px) {
.heading,
.container,{
width: 400px;
}
.main{
float: left;
height: 600px;
}
.left,
.right{
float: left;
height: 200px;
width: 400px;;
background-color: blue;
}
.main {
width: 400px;
overflow: scroll;
}
.heading{
width:400px;
height:153px;
}
.container {
height: 600px;
}
header{
font-size:.6em;
font-weight: bold;
width: 100%;
}
a{
font-weight: bold;
text-decoration: none; /*decoration 修饰 装饰*/
}
header nav a{
text-decoration: none;
font-weight: bold;
}
header nav ul li a{
display: block;/*和前面的inline,是不是冲突?*/
float: left;
padding: .1em 0.8em .1em;/*top right bottom*/
border-right: .1em solid;/*每个链接的右边框*/
}