【发布时间】:2014-02-27 03:25:04
【问题描述】:
我的网站上有一个固定的背景,应该根据浏览器窗口的大小进行拉伸。然而,由于某种原因,在到达页脚之前,底部有一条白色的小条。
也许我在 CSS 中的处理方式存在一些问题?
这是我的html:
<div class="clear" id='content'>
<br>
<br>
<br>
<?php
$section = $_GET["section"];
if ($section == 'changePassword'){
include "changePassword.php";
}elseif ($section == "contactinfo"){
include "contactInfo.php";
}elseif ($section == "publicinfo"){
include "publicInfo.php";
}elseif ($section == "import"){
include "import.php";
}elseif ($section == "users"){
include "viewUsers.php";
}elseif ($section == "sales"){
include "sales.php";
}elseif ($section == "statements"){
include "./statements.php";
}elseif ($section == "books"){
include "viewBooks.php";
}elseif ($section == "specialists"){
include "booking.php";
}elseif ($section == "viewUser"){
include "viewUser.php";
}elseif ($section == "logAsUser"){
include "loginAsUser.php";
}else{
include "account.php";
}
//specialists
?>
<script type="text/javascript" src="main.js"></script>
</div>
还有css:
.clear {
background: url('../assets/19.jpg') no-repeat fixed ;
background-size:100% 100%;
position: initial;
background-repeat: repeat-x;
background-repeat: repeat-y;
}
谢谢!
【问题讨论】:
-
请添加一个 js-fiddle。
标签: html css image background