Home > Web Front-end > HTML Tutorial > Tips for using div CSS_html/css_WEB-ITnose

Tips for using div CSS_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:27:01
Original
1170 people have browsed it

1. The ul tag has a padding value by default in Firefox, but in IE only margin has a value.

2. The same class selector can appear repeatedly in a document, but the id selector can only appear once; use class and id at the same time for CSS definition of a label. If the definition is repeated, id The definition of the selector is valid because the weight of ID is greater than CLASS.

3. Compatibility adjustment (IE and Firefox) method: Beginners may encounter such a situation: it is normal for the same label attribute to be set to A in IE, but it must be set to A in Firefox B can be displayed normally, or the two are reversed. Temporary solution: selector {property name: B !important; property name: A}.

4. If some spacing is required between a group of nested tags, leave it to the margin attribute of the tag located inside instead of defining the padding of the tag located outside.

5. It is recommended to use background-image instead of list-style-image for the icon in front of the li tag.

6. IE cannot distinguish the difference between inheritance relationship and father-son relationship. They are all inheritance relationships.

7. If you set a dark background image and bright text effect for a label. It is recommended to set a darker background color for your label at this time.

9. When defining the four states of a link, pay attention to the order: Link, Visited, Hover, Active; memory formula: a love or hate.

http://www.commernet.cn/newsny.asp?id=653

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