css1.0~3.0背景图使用多张折叠的概念与方法

2022-10-13,,,,

需求:使用多张图片作为页面的背景图

首先需要了解background的属性以及细节知识:

background-image:url("1.jpg"),url("2.jpg"),url("3.jpg");
background-repeat: no-repeat, no-repeat, no-repeat;  
background-position: 0 0, 200px 0, 400px 201px; 
如上写法;
可以通过调整图片的顺序显示哪张图片在最上端。

然后,需要了解关于background-position的具体用法:

相对坐标原点进行位置调整,或者使用

left, right, top, bottom, left top, left bottom, right top, right, bottom

分别表示,从左往右,从右往左,从上往下,从下往上,从左上往右下,从……(都懂的,不全写了)

暂时至此。

 

 


《css1.0~3.0背景图使用多张折叠的概念与方法.doc》

下载本文的Word格式文档,以方便收藏与打印。