我正在尝试为工具提示创建一个纯CSS三角形.除了最新的Firefox 4之外,所有浏览器看起来都很好.这是代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Untitled Document</title>
<style>
.arrow {
border:50px solid;
border-color:#eee transparent transparent transparent;
display:block;
height:0;
width:0;
top:50%;
right:50%;
position:absolute;
}
</style>
</head>
<body>
<div style="border:1px solid #000; height:400px; width:400px; margin:50px auto; position:relative;">
<span class="arrow"></span>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
Firefox 4截图:

其他浏览器截图:

正如你在Firefox 4中看到的那样,它有类似边框的东西.它是一个Firefox bug还是这个行为?
如何在FF4中实现没有可见边框的纯CSS三角形?此外,我需要其他3种颜色是透明的,因为这个三角形将重叠一些元素.