我有一個由幾個<article>
元素組成的頁面。在<article>
元素的底部是使用3D CSS變換的小型<div>
。奇怪的是,儘管原始的<article>
沒有硬件加速,但這個小的<div>
導致其餘的<article>
元素也有硬件加速(我使用的方法概述在這裏:http://mir.aculo.us/2011/02/08/visualizing-webkits-hardware-acceleration/),儘管它是隻有需要它的小型<div>
。Webkit硬件加速滲入頁面上的其他元素?
當我隱藏第一個<div>
時,後續的<article>
的硬件加速被禁用。
<article> <-- Does not have HW acceleration
[other divs and content]
<div></div> <-- Has HW acceleration
</article>
<article> <-- Has HW acceleration
[other divs and content]
<div></div>
</article>
<article> <-- Has HW acceleration
[other divs and content]
<div></div>
</article>
成爲
<article> <-- Does not have HW acceleration
[other divs and content]
<div style="display:none"></div>
</article>
<article> <-- Does not have HW acceleration
[other divs and content]
<div></div> <-- Has HW acceleration
</article>
<article> <-- Has HW acceleration
[other divs and content]
<div></div>
</article>
由於整個<article>
標籤漲幅硬件加速,子像素抗鋸齒被禁用,所有在<article>
文字的顆粒感。
有沒有簡單的事情可以防止後續的<article>
元素獲得硬件加速?
我想主要問題是,硬件加速砸了子像素抗鋸齒。我可以將-webkit-font-smoothing設置爲antialiased,但它不完全相同。好吧。 – 2011-03-30 21:23:56