Common tips for sharing 25 CSS front-end web design

Source: Internet
Author: User

1, the UL label in Mozilla default is padding value, and in IE only margin has value.
2, the same class selector can be repeated in a document, and the ID selector may only appear once, a tag with the class and ID for the CSS definition, if the definition is duplicated, the ID selector is defined as valid because the ID value is larger than class.
3, a compatibility adjustment (ie and Mozilla) Stupid method: Beginners may encounter such a situation: the same tag properties in IE set to a display is normal, and in Mozilla must be set to B to normal display, or two upside down.
Temporary Workaround: Selector {property name: B!important; property name: A}
4, if a group of tags to be nested between the need for some spacing, it is left in the label inside the margin property bar, and not to define the outside of the label padding
5. The icon in front of the Li Tag recommends using Background-image instead of list-style-image.
6, ie not clear the inheritance relationship and the difference between the parent-child relationship, all are the inheritance relationship.
7. When adding a selector to your tag, don't forget to add a comment to the selector in CSS. When you change your CSS later, you'll know why.
8. If you give a label a dark-toned background image and a bright-toned text effect. It is recommended that you set a dark-toned background color for your label at this time.
9, define the four states of the link to note the order: Link visited Hover active
10. For images unrelated to the content, please use background
11, the definition of color can be abbreviated #8899ff= #89F
12, table in some aspects than other labels performance is much better. Please use it where you want the column to be aligned.

Common tips for sharing 25 CSS front-end web design

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.