我刚才发现了一件奇怪的事...... 如果我在任何outter div(甚至更高级别)上都有插入阴影或border-radius,那么播放器会产生大约40%的CPU使用率。即使阴影不在这个玩家之上/之下。 怎么解决?没有阴影和border-radius,它大约是18%的CPU
我的网站结构如下:
<div>
<div>
<div>
<iframe src="http://player.vimeo.com/video/15273408" width="700"
height="400" frameborder="0"
webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
</div>
</div>
</div>
我的CSS看起来像这样:
box-shadow: inset 5px 7px 10px -5px black; border-radius: 3px;
我在Firefox和Chrome中都证实了这种行为;使用PNG背景属性不会出现此问题。