Internet Explorer 8如何支持CSS轮廓属性? [英] How does Internet Explorer 8 support the CSS outline attribute?

查看:85
本文介绍了Internet Explorer 8如何支持CSS轮廓属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

网站表示它支持以下样式不呈现。

The website says it's supported however the following style does not render.


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

但是,以下将呈现


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

这是我的文档


<?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>


推荐答案

检查IE8是否以兼容模式呈现。如果您的标题中包含以下内容,则outline将无法使用:

Check whether IE8 is rendering in a compliant mode. If you have something like the following in the your header, then outline will not work:

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

如果您的doctype标记不正确,IE8也会默认为quirks模式,此外,如果您使用IIS,服务器可能强制IE7兼容模式。

IE8 will also default to quirks mode if your doctype tag is incorrect, so verify this as well. Also, if you're using IIS, it's possible that the server is forcing IE7 compatibility mode.

这篇关于Internet Explorer 8如何支持CSS轮廓属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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