html - CSS 在 Firefox 上加载但不呈现

标签 html css firefox

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;
}

最佳答案

您在链接标签属性值中输入了错误的词,您输入的是“test/css”而不是“text/css”

您的标签:

<link rel="stylesheet" type="test/css" href="style.css">

更新标签:

<link rel="stylesheet" type="text/css" href="style.css">

关于html - CSS 在 Firefox 上加载但不呈现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24074436/

相关文章:

javascript - 当 onfocus 事件触发时,显示 p item 上的文本值。

html - iOS11 + Webview - 滚动div中的图像消失,不要回来

python - 如何为 Selenium 的 webdriver Firefox 启用缓存?

c++ - 火狐基本修改

php - Firefox 错误 'no element found'

Javascript .on 函数针对字符串变量具有的所有值运行,而不仅仅是其当前值

html - 如何制作透明的HTML按钮?

javascript - 是否可以向 chart.js 折线图添加阴影?

php元素从windows 7到ubuntu 12.04

html - 您将如何重新创建 macOS Catalina 页面滚动效果