0
嘿,这是我在后台使用2图像的代码,但是可以使用一个url来映射使用2个url的图像。使用单个url的多个背景
body { background-image: url(images/bgtop.png), url(images/bg.png); background-repeat: repeat-x, repeat; }
嘿,这是我在后台使用2图像的代码,但是可以使用一个url来映射使用2个url的图像。使用单个url的多个背景
body { background-image: url(images/bgtop.png), url(images/bg.png); background-repeat: repeat-x, repeat; }
当然,但它会涉及到在Photoshop比实际更多的CSS图像处理。
您必须将背景变为某种精灵,这意味着您必须将背景合并到一个图像中。然后使用多个不同的背景位置来显示图像的不同部分。
的Sprite例如:http://www.w3schools.com/css/css_image_sprites.asp#gsc.tab=0
多背景,使用不同的背景位的一个例子:http://www.css3.info/preview/multiple-backgrounds/注意到,本实施例中具有两个单独的图像,因此两个单独的URL。你需要结合使用不同的背景位置和使用精灵。
尝试阅读关于CSS sprites - http://www.w3schools.com/css/css_image_sprites.asp –