我已经创建了这段代码,但“主页”似乎不能像链接一样工作。在css a:链接中,“文字修饰”似乎可行,但“颜色”不起作用。它不像链接那样响应。下面是代码:head标签里面的div里面的链接不起作用
<!DOCTYPE html>
<html>
<head>
<style>
h4{
float:left;
margin:10px;
text-color:white;
font-family:cursive;
}
.exp{
margin-left:50px;
}
a:link{
text-decoration:none;
color:pink;
}
</style>
</head>
<body style="background-color:#787878">
<div style="background-color:#A2CD5A;
position:absolute; margin-left:180px;
margin-top:100px;width:1000px;
height:750px;">
<div style="background-color:#CAE1FF;
position:relative; top:50px;left:250px;
width:200px;height:400px;">
</div>
</div>
<div style="position:fixed;top:0px;left:0px;
height:3em;width:100%;background-color:#104E8B;
z-index:10">
<h4 class="exp"><a href="index.html">Home Page</a></h4>
<h4>My Blog </h4>
<h4>Accomplishments</h4>
<h4>Institutes</h4>
<h4>Some Fun!</h4>
<h4>Contact Me</h4>
<h4>Search:</h4>
<h6 style="position:relative;top:-16px">
<form>
<input type="text" name="search" value="SearchBox"/>
</form>
</h6>
</div>
</body>
</html>
一旦我删除''边缘''h4',它适用于我在Firefox中。不过,我无法告诉你为什么或者如何解决这个问题。 – ljacqu