我需要知道这段代码到底做了什么......或者如何使用它......实际上我用它来重复图像作为菜单的背景......需要解释......
url("images/home_bg.jpg") repeat-x scroll 0 0 transparent
最佳答案
它是 background
CSS 属性的简写。正是由于这个原因,速记不是一个好主意:很难弄清楚什么是什么。
长版是这样的:
background-image: url("images/home_bg.jpg");
background-repeat: repeat-x; /* Repeat image horizontally */
background-attachment: scroll; /* Whether image is fixed
or scrolls with page */
background-position: 0 0; /* x position, y position */
background-color: transparent;
关于html - 这段CSS代码的解释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2793541/