Bỏ qua đến nội dung

CSS Usage

No matter how you use CSS, the data shows that making sure your code works across all browsers is still a concern, especially for newer features such as :has().

Testing Environments

An encouraging sign of accessibility's growing importance, screen reader testing has gone up from 16.6% to 19% year-over-year.

0%
20%
40%
60%
79%
99%
1

Máy tính để bàn

7,133
2

Điện thoại thông minh

4,820
3

Máy tính bảng

3,108
4

Máy tính để bàn chỉ có bàn phím

2,027
5

Công cụ test (Axe, Lighthouse, v.v)

1,907
6

Điện thoại phổ thông

1,800
7

Máy đọc màn hình

1,330
8

Máy in

685
9

Altered Vision Simulator (mù màu, v.v)

398
10

TV

138
11

Đồng hồ thông minh

34
12

Máy chơi game

28
13

Câu trả lời khác

56
0%
20%
40%
60%
79%
99%
% của người trả lời câu hỏi
Which form factors or environments do you test on?
💡
Chia sẻ khảo sát này trên Twitter, Facebook hoặc qua email thì đã được khoa học chứng minh là cải thiện hiệu suất viết code của bạn lên tới 15%.

What do you mainly use CSS for?

While this data is unsurprising, it's a nice reminder that CSS can do a lot more than format webpages.

0%
17%
34%
51%
68%
85%
1

Web apps

6,036
2

Blogs or other text-heavy sites

3,394
3

Marketing sites & landing pages

3,221
4

Design systems

2,792
5

Desktop apps

1,862
6

Mobile apps

1,665
7

Emails

1,202
8

CSS art & illustrations

581
9

Printed documents

572
10

E-Commerce sites

11

Câu trả lời khác

118
0%
17%
34%
51%
68%
85%
% của người trả lời câu hỏi
What kind of project do you usually use CSS for?
We asked members of the CSS community to share their “pick of the year”

My 2024 Pick: linear()

The linear() easing function has enabled phenomenal finishing touches to interactions.
We asked members of the CSS community to share their “pick of the year”

Ngành công nghiệp

Did you know you can filter this survey's data by Industry Sector? Just click "Add Filters…" on any other chart!

0%
8%
16%
23%
31%
39%
1

Công cụ lập trình & kỹ thuật

2,447
2

Tư vấn & Dịch vụ

1,394
3

Thương mại điện tử & Bán lẻ

1,235
4

Công cụ Marketing/Bán hàng/Phân tích

846
5

Giáo dục

842
6

Tài chính

731
7

Giải trí

613
8

Tin tức, truyền thông & blog

583
9

Chăm sóc sức khỏe

468
10

Chính phủ

444
0%
8%
16%
23%
31%
39%
% của người trả lời câu hỏi
Bạn làm việc trong (những) ngành công nghiệp nào?

Whether you build websites profesionally or just dabble, there's no wrong way to use CSS!

0%
18%
36%
54%
72%
90%
1

Chuyên nghiệp

6,384
2

Như là một sinh viên

186
3

Như một sở thích

501
4

Câu trả lời khác

34
0%
18%
36%
54%
72%
90%
% của người trả lời câu hỏi
In what context do you primarily use CSS?

Design Methodology

While a large majority of respondents use CSS to implement pre-existing designs, it'll be interesting to see if this changes as design apps evolve, and AI tools become capable of going straight from idea to code.

0%
12%
24%
36%
48%
60%
1

I implement other people's designs

4,216
2

I create my own designs in design apps, and then implement them in CSS

1,004
3

I implement my own designs directly in CSS

1,765
4

Câu trả lời khác

129
0%
12%
24%
36%
48%
60%
% của người trả lời câu hỏi
Which of these best describes how you primarily design with CSS?

CSS vs JavaScript Balance

Even in the context of a CSS survey, it turns out a majority of respondents still spend most of their time in the JavaScript ecosystem. Only time will tell if this too will shift now that CSS is becoming more capable.

0%
5%
11%
16%
21%
27%
1

100% CSS

107
2

|

568
3

|

958
4

|

616
5

50%–50%

1,127
6

|

882
7

|

1,913
8

|

914
9

100% JS

40
0%
5%
11%
16%
21%
27%
% của người trả lời câu hỏi
How do you divide your time between writing CSS (including HTML markup) and JavaScript code?

Browser Incompatibilities

There are few worse feelings that knowing a new feature will solve your issue perfectly, yet not being able to use it because of poor browser support.

This is the case with Anchor Positioning, a promising new feature that is sadly not yet broadly supported.

Container Queries on the other hand are available at a baseline level and ready to be used, despite showing up in many respondent's answers!

0%
15%
29%
44%
59%
73%
1

2

3

4

5

6

7

8

Scrollbar styling

9

Browser support

10

Animate on Scroll

0%
15%
29%
44%
59%
73%
% của người trả lời câu hỏi
Are there any existing CSS features that you have difficulties using (or avoid altogether) because of lack of support, or differences between browsers?
(câu hỏi dạng tự do)
We asked members of the CSS community to share their “pick of the year”

My 2024 Pick: Getting Stuck: All the Ways position:sticky Can Fail

In all my years in CSS, position: sticky has to be one of the most frustrating capabilities, but it’s also extremely useful. I always wanted to write a guide to help people with that but luckily I don’t need to because Kilian nailed this one.
We asked members of the CSS community to share their “pick of the year”

Andy Bell

Designer, developer and founder of Piccalilli and Set Studio.

In the absence of a magic wand that lets us conjure up any CSS feature we can dream of, the best we can hope for is that this data can help push browser vendors in the right direction!

The good news: conditional logic, mixins, and masonry layouts are all currently being worked on in some form or another!

0%
20%
39%
59%
78%
98%
1

Mixins

2

Conditional Logic

3

Masonry Layout

4

Parent Selector

5

6

CSS Functions

7

Better Animations

8

For Loops

9

Browser Support

10

Scrollbar Styling

0%
20%
39%
59%
78%
98%
% của người trả lời câu hỏi
What features do you feel are currently missing from CSS altogether?
(câu hỏi dạng tự do)

Other CSS Pain Points

While browser support remains the eternal CSS pain point, Tailwind CSS is also proving to be a source of frustration for some – while others complain that it's not used enough!

0%
19%
38%
56%
75%
94%
1

Browser support

2

3

Excessive complexity

5

6

7

Conditional Logic

8

Debugging

9

Animations

10

Layout & positioning

0%
19%
38%
56%
75%
94%
% của người trả lời câu hỏi
Any other pain points related to writing CSS?
(câu hỏi dạng tự do)

Favorite New Feature

Long-awaited feature, sensible implementation, good browser support: :has() has it all, and tops the rankings of the best new CSS feature of 2024!

0%
9%
19%
28%
37%
47%
1

2

3

4

5

6

7

8

9

10

0%
9%
19%
28%
37%
47%
% của người trả lời câu hỏi
What are your favorite new CSS features that you started using this year?
(câu hỏi dạng tự do)
We asked members of the CSS community to share their “pick of the year”

My 2024 Pick: Scroll-driven Animations

This is a game changer that will soon be supported in all major browsers. It's incredible that what once required a lot of JavaScript is now achievable with just a few lines of CSS.
We asked members of the CSS community to share their “pick of the year”

Ahmad Shadeed

Design Engineer and author of Debugging CSS

State of Web Technologies

While we do love to complain about the state of thigns, it turns out happiness levels have remained surprisingly constent over the years.

0
1
2
3
4
2020
2021
2022
2023
2024
0
1
2
3
4
Trung bình {axis}
How happy are you with the general state of web technologies?

We are even seeing a slight uptick when it comes to CSS specifically, proof that the hard work by browser vendors, working groups, and the CSS community at large is not going unnoticed!

0
1
2
3
4
2020
2021
2022
2023
2024
0
1
2
3
4
Trung bình {axis}
How happy are you with the general state of CSS?

Tài nguyên được đề xuất

SVG Essentials & Animation, v2
Sarah Drasner
Netlify

SVG Essentials & Animation, v2

In this course, you'll learn to create immersive graphics and make them alive with animations!
Design for Developers
Sarah Drasner
Netlify

Design for Developers

Learn how to become self-sufficient for the entire process of execution from concept to design to implementation.
Cảm ơn các đối tác đã hỗ trợ chúng tôi! Tìm hiểu thêm.