asp.net - css 在 FF 和 chrome 中工作但不在 IE 8 中加载

标签 asp.net css

我在我的 aspx 页面中使用了这个 css 路径:

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

它在 FF 和 chrome 中工作正常,但在 IE 8 中,未加载 css。

我尝试在 IE 中使用 localhost:9133/styles/style.css 并加载/打开 css。

:focus {/* remember to define focus styles! */
    outline: 0;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: none;
}
table {/* tables still need 'cellspacing="0"' in the markup */
    border-collapse: separate;
    border-spacing: 0;
}
caption, th, td {
    font-weight: normal;
    text-align: left;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: "";
}
blockquote, q {
    quotes: "" "";
}
a img {
    border: 0;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display: block;
}

@font-face {
    font-family: "homenaje";
    src: url('fonts/Homenaje-Regular.ttf') ;
}

请给我建议解决方案。

最佳答案

为了让选择器在 IE8 中工作,您需要指定 doctype :

<!DOCTYPE html>

关于asp.net - css 在 FF 和 chrome 中工作但不在 IE 8 中加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12710377/

相关文章:

asp.net - Web 窗体中的对象是否持久存在于内存中?

CSS:将图像作为边框/框架包裹在 DIV 周围?

asp.net - 根据需要在服务器中生成并提供文件。在不消耗太多资源的情况下最好的方法是什么?

asp.net - 偶发的 ASP.NET 数据错误 : "Cannot find table 0"

javascript - 将 article 替换为带有一个按钮的 div,该按钮将保留并可以在 article 和 div 内容之间切换

javascript - 滚动条因背景图片而消失

jquery - 没有内联样式时的 element.style

html - 行内元素不接受 margin-top

c# - 将 iFrame 动态添加到页面?

asp.net - *ng用于不显示任何数据