6、CSS中的常属性
- 尺寸
宽度 width: 度|百分(若父级是body,就是浏览器的宽度*百分比)|auto(默认,浏览器宽度)
度 height
边界 margin padding 上右下左|上下左右 - 布局
浮动: float
定位: position 要有一个父级
弹性布局: flex
盒内容超出部分: overflow(溢出部分): hidden(隐藏溢出部分) | scroll(滚动可看到完整内容) | auto(同滚动)
-
外观、风格
background-color
background-image
background-repeat
background-size:100%引入的图片为多大就显示多大
background-position:center 居中|bottom下方……
可简化为:
-
文字属性
字体?? font-size (有限制大小,但是可使用缩放的方式得到想要的大小)
是否加粗 font-weight
是不是斜体 font-style
字体是什么 font-family