css简单学习属性2---背景图片
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> div{ background-image: url("图片1.png"),url("图片2.jpg"); /*图片1在x轴重复,图片2不重复*/ background-repeat: repeat-x,no-repeat; background-position: 100%,100%,center,center; /*盒子大小*/ width: 100px; height: 800px; } </style> </head> <body> <div> </div> </body> </html>
效果图