0

This CSS arrow works fine in chrome but breaks in IE. What's the best way to figure out how to make it work in IE9?

<html>
<head>

<style>
.nav {
    padding: 0;
    width: 115px;
}

.box {
    width: 100px;
    height: 50px;
    background-color: green;
    float: left;
    padding: 0;
}

.arrow-right {
    width: 0;
    height: 0;
    border-top: 25px solid transparent;
    border-bottom: 25px solid transparent;
    border-left: 15px solid green;
    float: right;
    padding: 0;

}
</style>
</head>


<body>
<div>
<div class="nav">
<div class="box"></div>
<div class="arrow-right"></div>
</div>
</body>
</html>
4

1 回答 1

4

可能是因为您没有 DOCTYPE,而 IE 以 quirks 模式呈现它。

<!DOCTYPE html>
于 2012-05-24T18:43:14.053 回答