Html ie9边框半径

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5381446/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 07:29:09  来源:igfitidea点击:

ie9 border radius

htmlcssinternet-explorer-9

提问by derekcohen

I have the following which works in Firefox, Chrome and Safari. But not in IE9. It's applying rounded corners to the top left and right of a td. What am I missing?

我有以下适用于 Firefox、Chrome 和 Safari。但不是在 IE9 中。它在 td 的左上角和右上角应用圆角。我错过了什么?

border-left: solid 1px #444f82;
border-right:solid 1px #444f82;
border-top:solid 1px #444f82;
border-top-right-radius: 7px;
border-top-left-radius: 7px;
-moz-border-radius-topright: 7px;
-webkit-border-top-right-radius: 7px;
-khtml-border-radius-topright: 7px;
-moz-border-radius-topleft: 7px;
-webkit-border-top-left-radius: 7px;
-khtml-border-radius-topleft: 7px;
behavior: url(/survey_templates/PIE.htc);

采纳答案by Adam Casey

Have you got this at the top of your HTML document (Above the <html>tag)

你在你的 HTML 文档的顶部有这个吗(<html>标签上方)

<!DOCTYPE html>

IE9 requires this for the website to display the new HTML5 / CSS3 things

IE9 要求网站显示新的 HTML5 / CSS3 东西

Edit: Or many other Doctype's (XHTML etc, but this is the shortest and easiest to remember)

编辑:或许多其他 Doctype(XHTML 等,但这是最短且最容易记住的)

回答by kprobst

As far as I know border radius should work on IE9. You might be missing this in your page header:

据我所知,边界半径应该适用于 IE9。您可能在页眉中缺少此内容:

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

"edge" means "use the latest rendering engine" so IE 9 will use 9, 10 uses 10, etc.

“edge”的意思是“使用最新的渲染引擎”,所以IE 9将使用9,10使用10,依此类推。

回答by Shekhar_Pro

In addition to causes mentioned by other answers, Checkin developer's tool (PressF12) your Document Mode should be set to Internet Explorer 9 Standards

除了其他答案提到的原因之外,Checkin developer's tool (Press F12) 您的文档模式应设置为Internet Explorer 9 Standards

enter image description here

在此处输入图片说明

回答by user1224025

Working great in explorer 9 and 8 with:

在资源管理器 9 和 8 中工作得很好:

<!DOCTYPE html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
</head>

回答by Omid

Have added <!DOCTYPE html>and <meta http-equiv="X-UA-Compatible" content="IE=edge" />in the page header and it has resolved my issue. If border-radius is not working in IE9, you've got to add both <!DOCTYPE html>and <meta http-equiv="X-UA-Compatible" content="IE=edge" />in the page header. Please bear in mind if you have <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">at the top your page the border-radius may not yet appear in IE9, therefore it's better you change it to <!DOCTYPE html>

在页眉中添加了<!DOCTYPE html><meta http-equiv="X-UA-Compatible" content="IE=edge" />,它解决了我的问题。如果边框半径在 IE9 中不起作用,则必须在页眉中添加<!DOCTYPE html><meta http-equiv="X-UA-Compatible" content="IE=edge" />。请记住,如果您<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">的页面顶部有边框半径可能尚未出现在 IE9 中,因此最好将其更改为<!DOCTYPE html>