How to use progressive enhancement and graceful degradation in css3
This time I will show you how to use progressive enhancement and graceful degradation in css3. What are the precautions for using progressive enhancement and graceful degradation in css3? The following is a practical case, let’s take a look. .
The two concepts of progressive enhancement and graceful degradation became popular after the emergence of CSS3. Since low-level browsers do not support CSS3, but the special effects of CSS3 are too good to give up, CSS3 is used in high-level browsers, while only the most basic functions are guaranteed in low-level browsers. The purpose of both is to focus on different experiences under different browsers, but their focus is different, which leads to different workflows.
objects to mainstream browsers (such as IE, Mozilla, etc.) previous version. Under this design paradigm, older browsers were considered to provide only a "poor, but passable" browsing experience. You can make some small adjustments to suit a specific browser. But since they are not the focus of our attention, except for fixing larger errors, other differences will be directly ignored.
The progressive enhancement perspective believes that attention should be paid to the content itself. Notice the difference: I didn't even mention the word "browser." Content is what motivates us to build a website. Some websites display it, some collect it, some seek it, some operate it, and some websites even include all of the above, but the same thing is that they all involve content. This makes progressive enhancement a more reasonable design paradigm. That's why it was immediately adopted by Yahoo! and used to build its "Graded Browser Support" strategy. Case analysis: (1) Code.transition { /*渐进增强写法*/ -webkit-transition: all .5s; -moz-transition: all .5s; -o-transition: all .5s; transition: all .5s; } .transition { /*优雅降级写法*/ transition: all .5s; -o-transition: all .5s; -moz-transition: all .5s; -webkit-transition: all .5s; }
Make your decision based on the version of the client your users are using. Please note my wording, I'm not using a browser, I'm using a client. Because the concepts of progressive enhancement and graceful degradation are essentially compatibility issues between low-version software and high-version software facing new features during the software development process. Server-side programs rarely have this problem, because developers can control the version of the server-side running program, so there is no problem of progressive enhancement and graceful degradation. But the client program is beyond the control of the developer (you can't force users to upgrade their browsers). What we call clients can refer to browsers, mobile terminal devices (such as mobile phones, tablets, smart watches, etc.) and their corresponding applications (browsers correspond to websites, and mobile terminal devices correspond to corresponding APPs) .
There is now very mature technology that allows you to analyze the proportion of versions using your client program. If there are many users of lower versions, of course, the development process of progressive enhancement will be preferred; if there are many users of higher versions, in order to improve the user experience for most users, of course, the development process of graceful degradation will be preferred.
But what is the actual situation? The vast majority of large companies adopt the progressive enhancement method because business is priority and improving user experience will never be at the top. For example: Update on the front end of the Sina Weibo website. For a website with hundreds of millions of users, it is absolutely impossible to pursue a certain special effect without considering whether it is available to users of lower versions. It must ensure that the low version to the high version is available. Accessibility, then progressive enhancement, using new features to provide a better user experience for users of higher versions. But there are no counterexamples. If you develop a software (or website) for teenagers, you know that this group of people always likes to try new things, always likes cool special effects, and always likes to update their software to the latest version (and Unlike our older generation of users). Faced with this situation, the development process of progressive enhancement is the best choice.
I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to other related articles on the php Chinese website!
Related reading:
html5 How to create a circle animation effect of pictures
How to use H5’s WebGL in the same The interface makes json and echarts charts
How to use the new semantic tag features of H5
The above is the detailed content of How to use progressive enhancement and graceful degradation in css3. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Using Bootstrap in Vue.js is divided into five steps: Install Bootstrap. Import Bootstrap in main.js. Use the Bootstrap component directly in the template. Optional: Custom style. Optional: Use plug-ins.

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

There are two ways to create a Bootstrap split line: using the tag, which creates a horizontal split line. Use the CSS border property to create custom style split lines.

To set up the Bootstrap framework, you need to follow these steps: 1. Reference the Bootstrap file via CDN; 2. Download and host the file on your own server; 3. Include the Bootstrap file in HTML; 4. Compile Sass/Less as needed; 5. Import a custom file (optional). Once setup is complete, you can use Bootstrap's grid systems, components, and styles to create responsive websites and applications.

There are several ways to insert images in Bootstrap: insert images directly, using the HTML img tag. With the Bootstrap image component, you can provide responsive images and more styles. Set the image size, use the img-fluid class to make the image adaptable. Set the border, using the img-bordered class. Set the rounded corners and use the img-rounded class. Set the shadow, use the shadow class. Resize and position the image, using CSS style. Using the background image, use the background-image CSS property.

How to use the Bootstrap button? Introduce Bootstrap CSS to create button elements and add Bootstrap button class to add button text

To adjust the size of elements in Bootstrap, you can use the dimension class, which includes: adjusting width: .col-, .w-, .mw-adjust height: .h-, .min-h-, .max-h-
