css在FF和chrome中工作但在IE 8中没有加载

时间:2012-10-03 14:13:17

标签: 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') ;
}

请建议我解决方案。

1 个答案:

答案 0 :(得分:0)

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

<!DOCTYPE html>