問題描述
我正在嘗試在 IE8 中旋轉(zhuǎn)文本.根據(jù)
轉(zhuǎn)到設(shè)置[齒輪]">>Internet選項">>安全"然后單擊自定義級別"并在結(jié)果窗口窗格中向下滾動以找到渲染舊過濾器"選項.啟用它.
I'm trying to rotate text in IE8. According to this answer, it should be possible to rotate an element as tried in the following example:
<!DOCTYPE html>
<html>
<head>
<style>
#enclosing {
width: 20px;
height: 100px;
border: 1px solid;
}
#rotated {
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=6.123031769111886e-17, M12=1, M21=-1, M22=6.123031769111886e-17, SizingMethod='auto expand')";
width: 100px;
}
</style>
</head>
<body>
<div id="enclosing">
<p id="rotated">rotated</p>
</div>
</body>
</html>
(got the numbers from this generator)
If I inspect the p element with the dev tools I can see it is somehow affected, because the blue border showing the selected element is rotated correctly (but the actual element is not being rotated), see image below.
Edit: For clarification, this is how it looks without the filter statement:
Your current markup works, the problem is that you have to enable legacy filters in IE10 to properly render your results in IE10 running in IE8-mode.
So, the answer then is to enable legacy filters: http://blogs.msdn.com/b/ie/archive/2012/06/04/legacy-dx-filters-removed-from-ie10-release-preview.aspx
Go to "Settings [Gear]" >> "Internet Options" >> "Security" Then click "Custom Level" and scroll way down in the resulting window-pane to find the "Render legacy filters" option. Enable it.
這篇關(guān)于為什么這個元素旋轉(zhuǎn)不起作用?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!