Html 社会党不工作
嗨,我在用一种叫socicon的东西,但它没有按我想要的那样工作 它可以在html文档1、2和3中使用,但是如果我尝试在stuff文件夹中的任何html文档中使用它,它都不起作用 这就是它看起来的样子 文件夹项目名称 文件夹材料 文件夹css 字体.css 单色字体-1.10.eot MonoFont-1.10.otf MonoFont-1.10.svg MonoFont-1.10.ttf 单色字体-1.10.woff 1.html 2.html 3.html htmlHtml 社会党不工作,html,css,Html,Css,嗨,我在用一种叫socicon的东西,但它没有按我想要的那样工作 它可以在html文档1、2和3中使用,但是如果我尝试在stuff文件夹中的任何html文档中使用它,它都不起作用 这就是它看起来的样子 文件夹项目名称 文件夹材料 文件夹css 字体.css 单色字体-1.10.eot MonoFont-1.10.otf MonoFont-1.10.svg MonoFont-1.10.ttf 单色字体-1.10.woff 1.html 2.html 3.html html 检查css文件的路径,看
检查css文件的路径,看起来您使用的是相对路径。确保stuff文件夹中的html文件指向正确的路径。-好吧,我让它工作了,但我遇到了另一个问题,那就是如果我更新了网站,然后我不是指单击更新图标或F5。我的意思是,如果点击url,点击回车键,我将只看到文本而不是符号,这不是很奇怪吗?这通常发生在字体加载不正确的情况下。大多数情况下,这是由于跨域问题,但由于您似乎正在本地加载字体,我不确定。检查您的控制台、firebug或任何其他web开发人员工具,以查看是否存在任何错误。另一个尝试是从字体名称中删除额外的句点。以防万一它把事情搞砸了。
<head>
<link rel="stylesheet" href="../css/fonts.css" />
</head
<body
<header>
<div class="logo">
<h1><a href="../../index.html">Bengzoor</a></h1>
</div>
<div class="social-media">
<a target="_blank" href="https://www.facebook.com"><span class="symbol">facebook</span></a>
<a target="_blank" href="https://www.twitter.com"><span class="symbol">twitter</span></a>
<a target="_blank" href="https://www.youtube.com/user/Terroristutrotaren"><span class="symbol">youtube</span></a>
</div>
</header>
<body
@font-face {
font-family: 'Mono Social Icons Font';
src: url('.MonoSocialIconsFont-1.10.eot');
src: url('MonoSocialIconsFont-1.10.eot?#iefix') format('embedded-opentype'),
url('MonoSocialIconsFont-1.10.woff') format('woff'),
url('MonoSocialIconsFont-1.10.ttf') format('truetype'),
url('MonoSocialIconsFont-1.10.svg#MonoSocialIconsFont') format('svg');
src: url('MonoSocialIconsFont-1.10.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
.symbol, a.symbol:before {
font-family: 'Mono Social Icons Font';
-webkit-text-rendering: optimizeLegibility;
-moz-text-rendering: optimizeLegibility;
-ms-text-rendering: optimizeLegibility;
-o-text-rendering: optimizeLegibility;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-font-smoothing: antialiased;
-ms-font-smoothing: antialiased;
-o-font-smoothing: antialiased;
font-smoothing: antialiased;
}
a.symbol:before {
content: attr(title);
margin-right: 0.3em;
font-size: 130%;
}