我正在嘗試爲頭導航創建一個css trianlge。我已經實現了它,但它在IE中不能正確渲染。Css三角形在IE中不能正確渲染
這裏是我創建的示例的工作小提琴解決方案。我已經修復了位置,但是當我嘗試在IE中運行(目前我有IE 11.0)時,三角形呈現爲方框,但是當我嘗試在Chrome和FF中運行它工作正常。
提琴手:http://jsfiddle.net/cKnyQ/20/
a:hover:after {
background: white;
border: solid black;
border-width: 1px 1px 0 0;
bottom: 0px;
content: ' ';
display: block;
height: 10px;
left: 32px;
position: absolute;
width: 10px;
z-index: 99;
-webkit-transform: rotate(-45deg);
-webkit-transform-origin: 50% 50%;
}
看一看這樣的:http://mrcoles.com/blog/callout-box-css-border-triangles-cross-browser/ – DonJuwe
我不知道IE支持-webkit轉換樣式。 (試試'變換') –
'-webkit'只適用於Webkit(Chrome/Safari/Opera15 +)。您錯過了其他廠商的前綴,例如'-ms'和W3C標準屬性。 –