盒模型中,如何設(shè)置文字在邊框中間
div{border:1px?dotted?red;weight:100px;height:100px}
假設(shè)這個div中間有“盒子”兩個字,如何補(bǔ)充以上代碼讓“盒子”這兩個字完全居中?就是上下左右距離邊框的距離都一樣
div{border:1px?dotted?red;weight:100px;height:100px}
假設(shè)這個div中間有“盒子”兩個字,如何補(bǔ)充以上代碼讓“盒子”這兩個字完全居中?就是上下左右距離邊框的距離都一樣
2016-07-16
舉報
2016-07-16
margin-left:auto;
margin-right:auto;
2016-07-20
div{
border:1px dotted red;
weight:100px;
height:100px;
margin:0px auto;
}