Python编程学习笔记13常用属性

1、背景颜色:background-color,取值与颜色属性相同。

2、背景图片:background-image。

(1)background-image:url(图片路径);

(2)background-image:none。

3、背景重复:background-repeat。

(1)重复平铺满:repeat;

(2)向X轴重复:repeat-x(横向);

(3)向Y轴重复:repeat-y(纵向);

(4)不重复:no-repeat。

4、背景位置:background-position,默认居中显示。

(1)横向:left、center、right;

(2)纵向:top、center、bottom;

(3)用数值来表示位置,如:background-positon:20px20px。

5、简写方式:background:背景颜色url(图像)重复位置,如:

background:#f60url(images/bg.jpg)no-repeattopcenter。




转载请注明:http://www.aierlanlan.com/rzgz/3979.html