Android 2.3 で別の z-index バグに遭遇した可能性があると思います。このウィジェットは、すべての主要な OS/ブラウザーの組み合わせで次のようにレンダリングされます。
使用している HTML は次のとおりです。
<ol>
<li>
<span class="ranking">1</span>
<h3>
<a href="...">TT Legends shows the exhilaration of motorbike racing</a>
</h3>
<span class="score-bar" style="width: 610px;"></span>
</li>
<li>
<span class="ranking">2</span>
<h3>
<a href="...">101-year-old grandmother 'comes back from the dead'</a>
</h3><span class="score-bar" style="width: 421px;"></span>
</li>
</ol>
これはCSSです:
.trending ol {
counter-reset: item;
list-style-type: none;
overflow: hidden;
}
.trending li {
position: relative;
min-height: 42px;
margin-bottom: 10px;
overflow: hidden;
}
.trending .ranking {
display: table-cell;
vertical-align: middle;
min-width: 40px;
text-align: center;
}
.trending h3 {
display: table-cell;
vertical-align: middle;
position: relative;
z-index: 2;
width: 100%;
margin-left: 40px;
padding: 5px;
line-height: 1.2;
}
.score-bar {
display: inline-block;
position: absolute;
top: 0;
bottom: 0;
left: 40px;
width: 0;
z-index: 0;
background: #f3f5f9;
}
JS を使用して、該当する項目のスコアに応じて青い .score-bar スパンの幅を設定します。
HTC Desire や Samsung Galaxy S2 などの Android 2.3 デバイスでは、次のようになります。
誰でも解決策を提案できますか? 考えられるすべての CSS 調整を試しましたが、何も修正されないようです。