akiran / akiran/react-slick

Cumulative Layout Shift

Đang mở
#2,091 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
11.9k
Fork
2.1k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

How we could avoid Cumulative Layout Shift?
I have a carousel in my web page. I am getting bad CLS score because elements on the carousel is changing size over page load.
![image](https://user-images.githubusercontent.com/18173423/137067724-a36fd2ff-091c-4056-ab52-ca83de355fe1.png)
![image](https://user-images.githubusercontent.com/18173423/137067758-59459398-ffb3-42f5-9535-9bbbe21ed42c.png)

I am using this settings
```
{
dots: false,
infinite: true,
slidesToShow: 5,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 3000,
nextArrow: ,
prevArrow: ,
responsive: [
{
breakpoint: 1280,
settings: {
slidesToShow: 4,
},
},
{
breakpoint: 1024,
settings: {
slidesToShow: 3,
},
},
{
breakpoint: 600,
settings: {
slidesToShow: 2,
},
},
{
breakpoint: 480,
settings: {
slidesToShow: 2,
},
},
],
}
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.