背景附件固定铬滞后

时间:2015-12-02 08:32:49

标签: css google-chrome background lag

我的网站上的Chrome设计再次出现问题。滚动时不会丢失fps并滞后于页面。我已经给了它很多圈来找到问题的真正罪魁祸首是财产background-attachment: fixed;

我试图用这个页面的解决方案解决这个问题并且没有为我工作。

https://petersproblems.wordpress.com/2014/12/06/background-attachment-fixed-causing-lag-when-scrolling/

我想使用background-attachment: fixed;并且没有滞后,有什么解决方案吗?

CSS:

body {
    margin: 0 auto;
    background-image: url(imagen/fondo.jpg);
    background-repeat: repeat-x;
    background-attachment: fixed;
    background-position: top center;
}

1 个答案:

答案 0 :(得分:1)

只需添加-

function Normalise($holder) {
    $holder = explode(" ",$holder);
    $norm = "";
    foreach($holder as $Word) {
        $Letter1 = substr($Word,0,1);
        $Letter1 = strtoupper($Letter1);
        $body = substr($Word,1);
        $body = strtolower($body);
        $norm = $norm.$Letter1.$body." "; 
    }
    $norm = substr($norm,0,-1);
    return $norm;
}


$m = "Reason:@:0";
$c = explode(":@:",$m);
$Garrr = (string)Normalise($c[0]);
$Huff = array([$Garrr] => $c[1]);
echo gettype($Garrr);
array_merge($ReasonNumbers,$Huff);