我正在制作一个HTML,CSS和PHP的网站,页面超出了屏幕,但浏览器没有提供滚动条(Mac上的Safari 5.0.6和Firefox 14.0.1).是因为我加入了PHP吗?但是在页面呈现之前不应该存在吗?
这是一个链接:测试网站
我的PHP语法:
<div id="content">
<div class="wrapper">
<div id="home" class="alert">
Welcome to always4free©! To browse the classifieds, you must first either choose a location or have your location detected.
</div>
<?php include "res/pages/categories.php"; ?>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
到底是怎么回事?
编辑:这是我的CSS:
body {
background-image: url("http://always4free.org/site/images/bg.jpg");
background-size: cover;
font-family: "Mouse Memoirs",sans-serif;
}
.wrapper {
margin: 0 auto;
width: 850px;
}
#header {
background: none repeat scroll 0 0 rgba(0, 0, 0, 0.5);
border-bottom: 3px solid green;
box-shadow: 0 2px …Run Code Online (Sandbox Code Playgroud) 我有一个容器div用ul它设置的这样的jsfiddle内:http://jsfiddle.net/BQPVL/1/
滚动为什么不工作?
HTML:
<div id="outside">
<ul id="inside">
<li>hi</li>
<li>how are you?</li>
<li>i am good.</li>
</ul>
</div>
<button id="left">←</button>
<button id="right">→</button>
Run Code Online (Sandbox Code Playgroud)
CSS:
#outside {
width: 200px;
height: 50px;
overflow: scroll;
}
#inside {
width: 1000px;
}
#inside li {
background: red;
width: 99px;
height: 40px;
border-right: 1px solid black;
float: left;
padding: 5px;
}
Run Code Online (Sandbox Code Playgroud)
jQuery的:
var position = $("#inside").scrollLeft();
$(document).ready(function() {
$("#right").bind("click", function() {
$("#inside").animate({
scrollLeft: position + 100
}, 1000);
});
});
Run Code Online (Sandbox Code Playgroud) 我有一张图片,当你点击时,这个功能就会运行。
function img(num) {
var src = "images/main" + num + ".jpg";
document.getElementById("popover-image").src = src;
$("#sheet").css("display", "block");
}
Run Code Online (Sandbox Code Playgroud)
当您单击“X”(图像)时,此函数将运行:
function close() {
$("#sheet").css("display", "none");
}
Run Code Online (Sandbox Code Playgroud)
但它不起作用。
这是我的图像的设置方式:
<img src="images/x.png" alt="Exit" onclick="close()" />