问题描述:

Possible Duplicate:

Support for “border-radius” in IE

I can't get border-radius to work in IE in my project, so I created this simple html file to see if I'm missing something.

<html>

<head>

<title>border test</title>

<style type="text/css">

body{background-color: #009de8;}

div{border: 2px solid red;border-radius: 5px;}

</style>

</head>

<body>

<div>

<h1>Hello world!</h1>

</div>

</body>

</html>

Still, borders are anything but round, though IE9 is supposed to support border-radius property.

Any idea what I'm missing?

网友答案:

Internet explorer, in general, goes into quirks-mode if no DOCTYPE tag is included, which will render pages in a somewhat unexpected way.

Add this html5 doctype tag at the beginning of your html document (first line) and it will work:

<!DOCTYPE html>

and it should work.

网友答案:

Check Support for "border-radius" in IE

You need this:

<meta http-equiv="X-UA-Compatible" content="IE=9" />
相关阅读:
Top