H5盒模型基础
1.<meta charset="utf-8">
2.屬性:width:寬度??? height:高度
3.背景:background
?????????? background-attachment:fixed;? 背景是否滾動
background-color:gray;背景顏色
background-image:url(bg. jpg);背景圖
background-repeat:no-repeat;背景圖是否重復
background-position:center,等等;背景圖位置
4.邊框:border
border-width:邊框寬度
border-style:邊框樣式
border-color:邊框顏色
邊框樣式:solid實線;dashed虛線;dotted點線(IE6不兼容);
例:border:1px solid red;邊框為1像素的實線紅色邊框
5.內邊框:padding
padding-top:上邊內邊距
padding-right:右邊···
padding-left:左邊···
padding-bottom:下邊···
注意:內邊距相當于給盒子加了填充厚度,會影響盒子大小。
6.外邊距:margin
margin:top,right,left,bottom;(同上,不包括注意)
?
轉載于:https://www.cnblogs.com/llz1314/p/5721142.html
總結
- 上一篇: 2017年最新女生qq网名
- 下一篇: 栈、堆、静态存储区