1
莫名其妙的CSS覆蓋(左|右)在DIR =「RTL」似乎並不管用。在Chrome/Firebug中:只有在禁用「left」屬性時,重寫的「left」(在.dir_rtl #main_search_wrapper下)樣式開始影響實際佈局。錯誤RTL佈局HTML - CSS覆蓋不起作用
看起來像一個普通的瀏覽器錯誤?
這裏是下面的代碼的一個活生生的例子:http://jsfiddle.net/DwRLz/
<html>
<head>
<style>
#main_search_wrapper {
display: inline-block;
position: absolute;
right: 0;
}
.dir_rtl #main_search_wrapper {
left: 0; /* <-- This should override the above style */
}
</style>
</head>
<body class="dir_rtl" dir="rtl">
<div id="main_search_wrapper" style="display: inline-block;">
This should be aligned to the left.
</div>
</body>
</html>
感謝
不重寫,只需添加。你的div有'left:0;'AND'right:0;' – 2013-03-15 11:29:38