我正在尝试在页面中添加一个表格,我无法让我的服务器显示很多变化,并且它决定我的背景颜色是黑色和灰色。我从索引和样式表中删除了所有颜色,并且它仍然是我的第一个div的黑色背景,当点击链接时,我的所有文本都是不可读的,因为它被这种炭色覆盖。我浪费了几个小时仍然不知道为什么我的div和图像不会大小和我的背景颜色没有变化。
HTML
<meta charset="UTF-8"/>
<link href="http://localhost/stylesheet.css" type="text/css" rel="stylesheet">
<link href="http://localhost/mary/jquery-ui-1.10.3.custom.min.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src='http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js'></script>
<!DOCTYPE><HTML>
<head>
<title>Mary Bishop</title>
<script type="text/javascript" src="http://localhost/jscript.js"></script>
<script type="text/javascript" src="http://localhost/jquery-ui-1.10.3.custom.min.js"></script>
</head>
<body>
<div id="content">
<div id="list">
<ul>
<li><a href="#">text</a></li>
<li><a href="#">text</a></li>
<li><a href="#">text</a></li>
<li style="font-family:Andale Mono"><a href="#">text</a></li>
<li><a href="#">text</a></li>
<li><a href="#">text</a></li>
<li style="font-family:fantasy"><a href="#">text</a></li>
<li><a href="#">text</a></li>
<li style="font-family: Bitstream Vera Sans Mono"><a href="#">text</a></li>
<li><a href="#">text</a></li>
<li><a href="#">text</a></li>
<li><a href="#">text</a></li>
<li><a href="#">text</a></li>
<li><a href="#">text</a></li>
<li><a href="#">text</a></li>
<li><a href="#"></a></li>
<li><a href="#"></a></li>
</ul>
</div>
</div>
<div id="background">
<div class="col1">stuff1
</div>
<div class="col1">stuff2
</div>
<div class="col1">stuff3
</div>
<br />
<br />
<div class="col2">
<ol>
<li>item</li>
<li>item</li>
<li>item</li>
<li>item</li>
<li>item</li>
</ol>
</div>
<div class="col2">
<ol>
<li>item</li>
<li>item</li>
<li>item</li>
<li>item</li>
<li>item</li>
</ol>
</div>
<div class="col2">more stuff</div>
</div>
</body>
</html>
CSS
#content {
height:100%;
width:100%;
}
body{
font-family: Arial, sans-serif;
font-size: 12px;
}
#list{
height:1600px;
width:100%;
position:relative;
margin:0 auto;
overflow:hidden;
}
#list ul, #list li{
list-style:none;
margin:0;
padding:0;
}
#list a{
position:absolute;
text-decoration: none;
}
#list a:hover{
}
#background {
width: 100%;
height: 100%;
z-index: 0;
}
.col1 {
display: inline;
z-index:2;
width: 300px;
height: 200px;
}
.col2{
display: inline;
z-index: 3;
width: 300px;
height: 200px;
}
(你可以看到,我甚至拿出了链接的悬停颜色,它仍然存在!)
JQuery是
$(document).ready(function () {
var element = $('#list a');
var offset = 0;
var stepping = 0.03;
var list = $('#list');
var $list = $(list);
$list.mousemove(function (e) {
var topOfList = $list.eq(0).offset().top;
var listHeight = $list.height();
stepping = (e.clientY - topOfList) / listHeight * 0.2 - 0.1;
});
for (var i = element.length - 1; i >= 0; i--) {
element[i].elemAngle = i * Math.PI * 2 / element.length;
}
setInterval(render, 30);
function render() {
for (var i = element.length - 1; i >= 0; i--) {
var angle = element[i].elemAngle + offset;
x = 120 + Math.sin(angle) * 10;
y = 45 + Math.cos(angle) * 40;
size = Math.round(40 - Math.sin(angle) * 20);
var elementCenter = $(element[i]).width() / 2;
var leftValue = (($list.width() / 2) * x / 100 - elementCenter) + "px"
$(element[i]).css("fontSize", size + "pt");
$(element[i]).css("opacity", size / 100);
$(element[i]).css("zIndex", size);
$(element[i]).css("left", leftValue);
$(element[i]).css("top", y + "%");
}
offset += stepping;
}
});
$(function(){
$('#list').click(function(){
$(this).hide();
$('#background').show("explode", 500);
});
});
我通过JSFiddle运行它,我得到同样的东西,所以我知道它不是我的服务器,它是我的代码:(请帮助,我超越我的智慧结束这个。沮丧甚至没有开始描述我现在的感受。:(