index.html和style.css在我的本地机器上练习编码。
Chrome和Safari正在正确渲染CSS,但FireFox 29却没有。 Firefox识别css文件,但它没有呈现它。我尝试过不同的机器但仍有同样的问题。
我已经验证了我的代码并且没有错误。我是否遗漏了阻止在Firefox中呈现此标记的任何标记?
<!DOCTYPE html>
<html>
<head>
<meta charset= "utf-8">
<link rel="stylesheet" type="test/css" href="style.css">
<title>Welcome!</title>
</head>
<body>
<div id="pagewrap">
<!-- Top Head of My Page -->
<div id="header">
<nav id="nav">
<a href="./index.html" id=logo><img src="#" alt="yo"></a>
<div id="socialnetwork">
<a href="#" id="linkicon"><img src="./Social_Icons/Linkedin.png" alt="LinkedIn"></a>
<a href="#" id="fbicon"><img src="./Social_Icons/facebook.png" alt="FB"></a>
<a href="#" id="igicon"><img src="./Social_Icons/Instagram.png" alt="InstaGram"></a>
<a href="#" id="twittericon"><img src="./Social_Icons/Twitter.png" alt="Twitter"></a>
<a href="#" id="skypeicon"><img src="./Social_Icons/Skype.png" alt="Yelp"></a>
<!-- Icons from Dribble by Dawid Dapszus https://dribbble.com/dashoo-->
</div>
<!-- End of Social Network Links-->
<ul>
<li><a href="./index.html" class="navlink">Home</a></li>
<li><a href="./aboutme.html">Portfolio</a></li>
<li><a href="./resume.html">Resume</a></li>
<li><a href="./aboutme.html">About Me</a></li>
<li><a href="./contact.html">Contact </a></li>
</ul>
</nav>
</div>
</div>
<!--End of Page Wrap -->
</body>
</html>
body {
font-family:'Century Gothic', sans-serif;
}
a {
text-decoration: none;
}
#pagewrap {
width:950px;
margin: 0 auto;
}
#socialnetwork {
padding-top: 100px;
float:right;
}
#socialnetwork img{
height:30px;
}
#nav ul{
text-align: left;
border-bottom: groove;
}
#nav li{
margin:0 15px 0 0;
display: inline;
}
#nav li a:link{
color:#868686;
}
#nav li a:visited{
color:#868686;
}
#nav li a:hover{
color:#324EDC;
}
#nav li a:active{
color:#324EDC;
}
答案 0 :(得分:6)
您在链接标记属性值中键入了错误的单词,您正在输入&#34; test / css&#34;而不是&#34; text / css&#34;
你的标签:
<link rel="stylesheet" type="test/css" href="style.css">
更新标记:
<link rel="stylesheet" type="text/css" href="style.css">
答案 1 :(得分:2)
type="test/css"
不应该是:text / css?