我想在我的html中使用背景图片(bg.png),但我想调整图片的大小,所以它会始终填充整个页面。我这样做是这样的:如何调整body标记中的html背景图片的大小
.stretch {
width:100%;
height:100%;}
#background {
width: 100%;
height: 100%;
position: fixed;
left: 0px;
top: 0px;
z-index: -1; }
身体里面的:
所以我在网站上使用CMS(E107),现在,我要像在我的HTML的背景下,我改变了图片,但我不知道如何在css/php文件中使用它。
这是它的主题的CSS:
body
{
font-size: 12px;
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
width: 87%;
border-color: #39393b;
border-width: 0px;
border-style: solid;
color: #C0C0C0;
font-family: Verdana, Arial, Helvetica, sans-serif;
background-color: #444440;
text-align: center;
background-image: url(images/bg.png);
background-repeat: repeat-x;
}
我如何可以添加拉伸里面这个CSS?
-10-28
iron24
+0
您可以使用背景尺寸:盖;在你的身体上设置整个元素的bg.png。 –
-10-28 14:34:06