简体   繁体   English

CLS 警报不支持的 CSS 属性在 PageInsights 核心 Web 生命体征

[英]CLS alerts Unsupported CSS Property in PageInsights Core Web Vitals

In Google PageSpeed Insights, getting a lot of alerts as Unsupported CSS Property.在 Google PageSpeed Insights 中,收到很多警报作为 Unsupported CSS 属性。

Avoid non-composited animations Animations which are not composited can be janky and increase CLS.避免未合成的动画未合成的动画可能会很卡顿并增加 CLS。

Unsupported CSS Property: font-weight Unsupported CSS Property: color Unsupported CSS Property: margin-right Unsupported CSS Property: font-size Unsupported CSS Property: background-position-y Unsupported CSS Property: background-position-x Unsupported CSS Property: margin-bottom. Unsupported CSS Property: font-weight Unsupported CSS Property: color Unsupported CSS Property: margin-right Unsupported CSS Property: font-size Unsupported CSS Property: background-position-y Unsupported CSS Property: background-position-x Unsupported CSS Property: margin-底部。 . . . . So on..很快..

Attaching the image also: Screenshot of the Alerts还附上图像:警报的屏幕截图

For anyone stumbling on this (like me) after spending some time to find a solution:对于花一些时间找到解决方案后绊倒这个的人(比如我):

Here is where you should start looking:这是您应该开始寻找的地方:

Non-Composited Animations :非合成动画

A non-composited animation is any animation that triggers one of the earlier steps in the rendering pipeline (Style, Layout, or Paint).非合成 animation 是触发渲染管道(样式、布局或绘制)中较早步骤之一的任何 animation。 Non-composited animations perform worse because they force the browser to do more work.非合成动画表现更差,因为它们迫使浏览器做更多的工作。

The linked article is from web.dev an should be reachable for the next few years.链接的文章来自 web.dev,应该可以在未来几年内访问。 The article has a few useful links that might help you search to a solution:这篇文章有一些有用的链接,可以帮助您搜索解决方案:

All links point towards web.dev.所有链接都指向 web.dev。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM