CSS文件不能在Firefox中加载/显示 [英] CSS file not loading / displaying in Firefox

查看:187
本文介绍了CSS文件不能在Firefox中加载/显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在首次创建了一个小页面网站..
它在Chrome&桌面,平板电脑和桌面上的Safari浏览器手机,但在Firefox(v20的Mac OS)的CSS不加载(本地或在线)。

我做了一些研究&已经检查/修改了以下内容:


  • 编码是utf-8
  • 没有区别/相对使用绝对路径时更改。

  • 路径是正确的,直到css文件的区分大小写的名称。

  • 链接类型已指定(text / css)

  • 缓存已被清除。 ul>

    ..但仍然没有运气,下面是链接到css&它也住在 http://www.louisetiernan.com

     < head> 
    < meta charset =utf-8>

    < meta name =viewportcontent =width = device-width,initial-scale = 1.0>
    < link rel =stylesheettype =text / csshref =styles.css/>

    < / head>

    所有帮助非常感谢。谢谢。

    解决方案

    你的CSS中有错别字。超过第一个错字的所有内容都不会执行:



      @ font-face {
    font-family:'chaparral';
    src:url('fonts / chaparralprosemibold.eot); / * IE9兼容模式* /
    }

    @ font-face {
    font-family:'chaparralr';
    src:url('fonts / chaparralproegular.eot); / * IE9兼容模式* /
    }

    添加 >

      @font -face {
    font-family:'chaparral';
    src:url('fonts / chaparralprosemibold.eot'); / * IE9兼容模式* /
    }

    @ font-face {
    font-family:'chaparralr';
    src:url('fonts / chaparralproegular.eot'); / * IE9兼容模式* /
    }

    c $ c>'在url参数中。


    I'm creating a small one page website ..for the first time in quite a while. It works fine on chrome & safari across desktop, tablet & phone but on Firefox (v20 for mac os) the CSS does not load (locally or online).

    I have done some research & have checked / amended the following:

    • the encoding is "utf-8"
    • no difference / change when using absolute paths over relative.
    • path is correct, right down to the case sensitive name of the css file.
    • link type is specified (text/css)
    • cache has been cleared.. alot..

    .. but still no luck, below is the line of code linking to the css & it is also live on http://www.louisetiernan.com

    <head>
    <meta charset="utf-8">
    
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" type="text/css" href="styles.css" />
    
    </head>
    

    All help very much appreciated. Thanks.

    解决方案

    You have typos in your CSS. Everything beyond the first typo is not executed:

    What you have:

    @font-face {
      font-family: 'chaparral';
      src: url('fonts/chaparralprosemibold.eot); /* IE9 Compat Modes */
    }
    
    @font-face {
      font-family: 'chaparralr';
      src: url('fonts/chaparralproegular.eot); /* IE9 Compat Modes */
    }
    

    Add the ' just before the )

    @font-face {
      font-family: 'chaparral';
      src: url('fonts/chaparralprosemibold.eot'); /* IE9 Compat Modes */
    }
    
    @font-face {
      font-family: 'chaparralr';
      src: url('fonts/chaparralproegular.eot'); /* IE9 Compat Modes */
    }
    

    You forgot 2 instances of the closing ' in the url arguments.

    这篇关于CSS文件不能在Firefox中加载/显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆