本文介绍了使用background-size:cover的Chrome性能不佳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要覆盖我网站的背景,我总是看到鼠标悬停的滞后/ lug s 或任何其他操作。你有任何想法如何解决这个问题吗?
我有一个工作示例(如果我没有更新代码):

I need to cover background in my site and I always see lags/slugs on mouse over or any other action. Do you have any idea how to fix this issue?I have a working example here (If I didnt update the code yet) : http://natgeo.geryit.com

ul#posters li {
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    float: left;
    height: 170px;
    position: relative;
    width: 25%;
}


推荐答案

在chrome中使用background-size时,你运气不好。

You're out of luck when it comes to background-size in chrome.

我已经看到人们使用Javascript / jQuery。请参见

I've seen people do it with Javascript / jQuery. See http://srobbin.com/jquery-plugins/jquery-backstretch/

这篇关于使用background-size:cover的Chrome性能不佳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-18 11:55
查看更多