Internet Explorer 8如何支持CSS大纲属性?

Internet Explorer 8如何支持CSS大纲属性?,css,internet-explorer-8,Css,Internet Explorer 8,表示支持,但以下样式不渲染 <style type="text/css"> a[href="#"]{outline:#f00 dotted 2px !important} </style> a[href=“#”]{大纲:#f00点着2px!重要} 但是,下面将呈现 <style type="text/css"> a[href="#"]{border:#f00 dotted 2px !import

表示支持,但以下样式不渲染


    <style type="text/css">
        a[href="#"]{outline:#f00 dotted 2px !important}
    </style>

a[href=“#”]{大纲:#f00点着2px!重要}
但是,下面将呈现


    <style type="text/css">
        a[href="#"]{border:#f00 dotted 2px !important}
    </style>

a[href=“#”]{边框:#f00点着2px!重要}
这是我的文件


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <title>...</title>
   <link type="text/css" rel="stylesheet" href="../content/style.css" />

</head>
<body>...</body>
</html>

...
...

可能是因为该链接在浏览器中的显示形式不是
,而是
yourpage.html

请尝试使用以下结尾:

<style type="text/css">
    a[href$="#"]{outline:#f00 dotted 2px !important}
</style>

a[href$=“#”]{大纲:#f00点着2px!重要}

检查IE8是否以兼容模式渲染。如果标题中有以下内容,则大纲将不起作用:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >


如果您的doctype标记不正确,IE8也将默认为quirks模式,因此也请验证这一点。此外,如果您使用的是IIS,则服务器可能正在强制IE7兼容模式。

您确定应用了该规则吗?我认为IE8确实支持属性选择器(),但这值得检查。它仅在标准模式下受支持。。。页面处于何种呈现模式?边框与大纲不同。他只是指出他使用的选择器是为他的目的而工作的。我已经在我的原始问题中添加了文档的标题。它是XHTML1.0严格的,它验证了这一点,我打开了兼容模式