我已經創建了這段代碼,但「主頁」似乎不能像鏈接一樣工作。在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