端が丸く、片側に境界線がある css 要素があります。境界線と端が丸くなっている側を変更すると、子要素の絶対位置の更新が拒否され、理由がわかりません。2.3 Android ブラウザと Google Chrome でこれをテストしましたが、どちらも同じ問題を示しています。奇妙なことに、Google chrome で右クリックして「要素の検査」に移動すると、位置が更新され、絶対要素が正しく右にスナップされます????
私はこれに非常に混乱しています。これはjsfiddleリンクです。これを修正する方法はありますか? http://jsfiddle.net/yhT5n/1/
元のソース:
HTML:
<div id="page" class="side_a">
<div class="absl"> </div>
</div>
CSS:
#page{
margin:30px;
position:relative;
display:block;
width:100px;
height:150px;
background-color:gray;
z-index:10003;
-webkit-transition-property: width, height;
-webkit-transition-duration: 0.5s;
border-radius: 15px;-moz-border-radius: 15px;
border-width:3px;
border-top-style:none;
border-right-style:none;
border-bottom-style:none;
border-left-style:none;
border-color:#000;
}
#page.side_a{
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-right-style:dashed;
}
#page.side_b{
border-top-left-radius: 0;
border-bottom-left-radius: 0;
border-left-style:dashed;
}
.absl{
position:absolute;
right:0px;
top:20px;
width:20px;
height:20px;
background:red;
}
JS:
$('#page').live('click', function() {
$(this).removeClass('side_a').addClass('side_b');
});