2011-03-21 183 views
34

我有以下的工作在Firefox,Chrome和Safari。但不是在IE9中。它将圆角应用到td的左上角和右侧。我错过了什么?ie9边界半径

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); 
+0

doctype声明? – zzzzBov 2011-03-21 17:43:22

回答

20

你有没有在这HTML文档的顶部(高于<html>标签)

<!DOCTYPE html> 

IE9需要这个的网站,以显示新的HTML5/CSS3的东西

编辑:或许多其他文档类型的(XHTML等,但这是最短,最容易记住)

+1

<!DOCTYPE html PUBLIC“ - // W3C // DTD XHTML 1.0 Strict // EN”“http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict。dtd“> – derekcohen 2011-03-21 18:27:48

74

据我所知边界半径应该在IE9上工作。你可能在你的网页标题中缺少这样的:

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

“边缘”表示“使用了最新渲染引擎”,让IE 9将利用9,10使用10等

+1

修复它 - 希望它不会破坏别的 – derekcohen 2011-03-21 18:33:53

+0

@derekcohen希望不是:D – kprobst 2011-03-21 18:44:05

+0

是它打破了pie.htc哪些barfs在附加方法 – derekcohen 2011-03-22 04:43:32

13

除了其他的答案中提到的原因,入住在开发者工具(按F12)您的文档模式应设置为Internet Explorer 9 Standards

enter image description here

+0

它说IE12的文档标准为 – derekcohen 2011-03-21 18:34:33

+0

这就是问题改成IE9的标准,它应该可以正常工作 – 2011-03-22 02:09:02

+1

怪异模式:我的CSS菜单ok,没有边界半径IE9 std:我的CSS菜单崩溃 – jondinham 2011-11-06 04:14:46

0

已在页面标题中添加了<!DOCTYPE html><meta http-equiv="X-UA-Compatible" content="IE=edge" />并解决了我的问题。 如果border-radius在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>

+0

答案似乎不完整 – RedBaron 2013-05-28 11:17:50

+0

抱歉,没有意识到代码在插入后变得不可见,我纠正了它们。 – Omid 2013-05-28 11:34:51

1

在Explorer 9中工作的伟大和8:

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