在網(wǎng)頁中 一切都是盒子(important)
盒子大小由內(nèi)容區(qū)实昨,內(nèi)邊距洞豁,邊框決定
一:內(nèi)容區(qū)(content)
?內(nèi)容區(qū)指的是盒子中放置內(nèi)容的區(qū)域,也就是元素 中的文本內(nèi)容子元素都是存在于內(nèi)容區(qū)中的。
用width height 來設(shè)置內(nèi)容區(qū)的大小
width height只適用于塊元素
二:邊框用 border屬性 (width丈挟,color闰挡,style)
border-width:10px? 20px 30px 40px; 上右下左的邊框距
border-width:10px? 20px 30px;上 左右 下的邊框距
border-width:10px? 20px 30px;上下 左右的邊框距
border-width:10px;所有邊框的邊框距
border-color:red green orange yellow;上右下左的邊框距顏色
border-color:red green orange;上 左右 下的邊框距顏色
border-color:red green;上下 左右的邊框距顏色
border-color:red;所有的邊框局顏色
border-style :solid 實(shí)線礁哄, dotted 點(diǎn)狀, dashed 虛線溪北, double 雙線
border:green solid 20px(簡(jiǎn)寫)
上下左右邊框 的邊框樣式
border-top: orange solid 20px;
border-bottom: green solid 20px;
border-left:red solid 20px?
border-right: blue solid 20px;
設(shè)置除了右邊的其他三個(gè)邊框
border:color? style? width