前端周
2016-07-16 14:16
div{border:1px dotted red;weight:100px;height:100px}
假设这个div中间有“盒子”两个字,如何补充以上代码让“盒子”这两个字完全居中?就是上下左右距离边框的距离都一样
margin-left:auto;
margin-right:auto;
div{
border:1px dotted red;
weight:100px;
height:100px;
margin:0px auto;
}
初识HTML(5)+CSS(3)-升级版
1228890 学习 · 19081 问题
相似问题