IE10とChromeで問題があります-
li span
を含む幅を設定しました。スパンの幅を考慮して、私は
li
に帰属します。 IEがテキストの
1px
を見落とす...この問題は特定のサイズ
font-size ex: 18px
で発生し、問題の原因がわかりません。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>HEY</title>
<script type="text/javascript" src="jquery-1.7.1.js"></script>
<style type="text/css">
html {font-family:Arial, Helvetica, sans-serif; }
#hp_barreSeek{ background:#f0f0f0; height:37px; width:100%; }
#hp_barreSeekData{ height:37px; width:940px; margin:0 auto 0 auto; }
#hp_barreSeekData ul,#hp_barreSeekData ul li,#hp_barreSeekData ul li span{
height:37px; line-height:37px; vertical-align:middle;
display:block;}
#hp_barreSeekData ul{ padding:0 18px 0 18px; }
#hp_barreSeekData ul li{ float:left; list-style:none;}
#hp_barreSeekData ul li+li{ margin-left:45px;}
#hp_barreSeekData ul li span{ font-size:18px; }
#hp_barreSeekData ul li+li>span{cursor:pointer!important;}
#hp_barreSeekData ul li+li>span:hover,#hp_barreSeekData ul li span.selected{ color:#cacaca;}
</style>
</head>
<body>
<div id="hp_barreSeek">
<div id="hp_barreSeekData">
<div id="tabs">
<ul>
<li class="title" ><span>Title</span></li>
<li id="toto" ><span id="onefx">btn1 hey</span></li>
<li ><span>btn2</span></li>
<li ><span>btn3</span></li>
<li ><span>btn4</span></li>
<li class="clear"></li>
</ul>
</div>
<div class="clear"></div>
<script type="text/javascript">
$('#onefx').on('click',function(){
$('#toto').css('width',$(this).width());
console.log($(this).width());
});
</script>
</div>
</div>
</body>
</html>