此CSS箭头在Chrome中工作正常,但在IE中中断。了解如何使其在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>
答案 0 :(得分:4)
也许是因为你没有DOCTYPE而且IE以怪癖模式呈现它。
<!DOCTYPE html>