CSS web page layout considerations

巴扎黑
Release: 2017-08-14 14:45:42
Original
1665 people have browsed it

Friends who often use p+css layout need to pay attention to the following points

1. Use less bias.

It is best to use less censorship CSS such as break-word, manual layering with z-index, vertical alignment, etc., because not all browsers may support it, and it is extremely difficult. Passed W3C detection.

 2. Center is not a float value.

Many novices will mistake center for the value of float, but it is not the case. center is just the value of text-align.

 3. Alignment cannot include two values.

Many novices will fill in two values ​​​​in float or text-align, such as: float:left top. This is not allowed and is not recognized by the browser.

 4. It is best not to customize the color of the scroll bar.

Many browsers cannot properly recognize scroll bars with custom colors, and many custom colors cannot pass W3C.

 5. Separate scroll bar settings.

Nowadays, overflow-x (horizontal scroll bar) or overflow-y (vertical scroll bar) are often used. When setting this, we often find that not all clients have the effect. Everyone When setting, it is best to set it in body and html at the same time. However, this CSS is not supported by CSS2.1 (CSS2.1 supports overflow and defines horizontal and vertical scroll bars). This definition method was not supported until CSS3. Use as little as possible.

 6. If the background and color colors are the same, you will be warned.

The above is the detailed content of CSS web page layout considerations. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!