当使用transform: rotate(180deg)
时,我在IE9、IE10和IOS 8中遇到了问题,图标消失了。
我尝试使用-ms
供应商前缀,但没有用。
.down-arrow {
-ms-transform: rotate(180deg);
transform: rotate(180deg);
-ms-transform-origin: center;
transform-origin: center;
width: 16px;
height: 16px;
}
svg {
max-height: 100%;
max-width: 100%;
vertical-align: top;
}
<div style="display:none">
<svg>
<symbol id="down-arrow">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.527,6.854L0.202,1.042c-0.269-0.288-0.269-0.754,0-1.042h8.621
c0.269,0.288,0.269,0.755,0,1.042" />
</symbol>
</svg>
</div>
<div class="down-arrow">
<svg>
<use xlink:href="#down-arrow"></use>
</svg>
</div>
我认为这不仅适用于SVG,也适用于使用HTML元素。请查看此示例fiddle。
.down-arrow {
width: 0;
height: 0;
border-width: 12px;
border-color: #000 transparent transparent transparent;
border-style: solid;
-ms-transform: rotate(180deg);
transform: rotate(180deg);
-ms-transform-origin: center;
transform-origin: center;
}
<div class="down-arrow"></div>