看了一下蓝桥杯官网给的资料,还说的挺多的..感觉很多都是没见过的,有点懵..
1.background-position属性. 两个值 一个是x轴的一个是y轴的,可以写方位词也可以写几px这种. 这里总结了一下方位词 x:right left center y:top center bottom
写法示例: background-position: 20px center.
对了,你要先看是谁的背景.谁的背景位置就相对谁而言.
2.background复合属性: 因为这个有点长,所以我这写个基本的示例就完事了.
background: #00ff00 url('smiley.gif') no-repeat fixed center;
3.文本属性:
| 属 性 | 可 取 值 | 描 述 |
|---|---|---|
| line-height | normal、number、length、% | 设置行高 |
| text-indent | length、% | 设置文本缩进 |
| text-align | left、right、center、justify、start、end | 设置对齐方式 |
| letter-spacing | normal、length | 设置字符间距 |
| text-decoration | line、color、style、thickness | 设置文本修饰 |
| white-space | normal、pre、nowrap、pre-wrap、pre-line、break-spaces | 规定如何处理空白 |
| line-break | auto、loose、normal、strict、anywhere、unset | 处理如何断开带有标点符号的文本的行 |
line-height 用于设置多行元素的空间量,可取值具体说明如下:
normal:取决于用户端。number:数字乘以元素的字体大小。length:指定长度用于计算高度。%:计算值是给定的百分比值乘以元素计算出的字体大小。
4.列表样式:
| 属 性 | 可 取 值 | 描 述 |
|---|---|---|
| list-style | list-style-type、list-style-position、list-style-image | 在一个声明中设置所有的列表属性 |
| list-style-image | URL、none | 设置图像为列表项标志 |
| list-style-position | inside、outside、inherit | 设置列表中列表项标志的位置 |
| list-style-type | disc(默认)、circle、square、decimal 等 | 设置列表项标志的类型 |
5.伪类选择器:
| 状态 | 效果 |
|---|---|
| a:link | 普通的、未被访问的链接。 |
| a:hover | 鼠标指针位于链接的上方。 |
| a:active | 链接被单击的时刻。 |
| a:visited | 用户已访问的链接。 |
6.补充一个: background-repeat的属性 这个一般都写的no-repeat的..repeat-x,repeat-y了解一下就行了.