Front-end style practice out of the Truth series (ii)

Source: Internet
Author: User

1.CSS inheritance refers to the CSS style that we set the ancestor (parent) to, and the parent and child (subordinate) with this property.

Generally only text text some styles have inheritance characteristics, such as text size, text bold, text color, font and so on. Most other style attributes are not inherited

Common inherited CSS Properties: font, color;

2, a lot of HTML tags have their own default properties, which can sometimes bring us a lot of trouble and inconvenience, so a good front-end engineer, preferably in the beginning, the style of common tags under initialization.

Commonly used initialization method, can refer to: http://www.divcss5.com/template/m17.shtml

3, talking about CSS compatibility issues,

CSS compatibility includes the following points: CSS page layout dislocation, CSS Web pages in different browsers display text size, color inconsistency, CSS page blank, div+css in each browser display layout style is different

CSS compatibility issues occur because the CSS is not initialized, the charset encoding is incorrect, the label is not closed, the browser interprets the CSS property is different, the CSS fails, the DOCTYPE declaration

The solution: To prevent the occurrence of the cause, to avoid the possibility.

Front-end style practice out of the Truth series (ii)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.