css
- 盒子模型的顺序是 上右下左
- border和background 和font一样的 也是一个复合属性
- 想让边框的粗细显示出来必须要规定边框的样式
- 边框的样式默认是黑色
- transparent透明色
- none:无边框
- solid:实线边框
- dashed:虚线边框
- dotted:点状边框double:双线边框
- hidden:与none相同,应用于表解决边框冲突
div{ | |
| ---- | ------------------------------------------------- |
| | width: 500px; |
| | height: 500px; |
| | background-color: chartreuse; |
| | /* 使用背景图片会默认把div占满 / |
| | background-image: url(./img/dress01.png); |
| | background-repeat: no-repeat; / 背景图片只出现一次,不重复 / |
| | / background-position: 50% 50%; / |
| | background-position: center center; |
| | / 50%和center 作用一致*/ |
| | /* background-position: right bottom; / |
| | / 像素值:px % |
| | 关键词: |
| | 水平方向:left、center、right |
| | 垂直方向:top、center、bottom |
| | no-repeat |
| | repeat |
| | repeat-x |
| | repeat-y
行内样式>内部样式表>外部样式表
ID选择器>类选择器>标签选择器 而且不受顺序影响important优先级最高