Well organized 24 css skills _ experience exchange
Source: Internet
Author: User
There are a lot of tips in CSS web page layout development, and new users are often unfamiliar with this. It may take a long time to figure out one or two small issues. Although many documents have mentioned this issue many times, but there are still many friends who make mistakes on these issues. Let's take a look at these CSS skills today and read them carefully. You may not be able to fully understand them. You can search and expand your desired knowledge. I believe you will have a lot to learn!
1. ul labels have padding values by default in Mozilla, while only margin has values in IE.
2. The same class selector can be repeated in a document, but the id selector can only appear once. CSS is used to define a tag using both class and id. if the definition is repeated, the definition of id selector is effective because the id has a higher weight than the class.
III. A stupid way to adjust compatibility (IE and Mozilla:
A beginner may encounter this situation: it is normal to set the attribute of the same tag to A for display in IE, and B for display in Mozilla, or two for display.
Temporary solution: select the character {property name: B! Important; attribute name: A} sometimes does not work. You can search for more BUG solutions in jb51.net.
4. If some spacing is required between a group of labels to be nested, leave it to the margin attribute of the label located inside, instead of defining the padding of the label located outside.
5. We recommend that you use background-image instead of list-style-image for the icon in front of the li label.
6. IE cannot tell the differences between the inheritance relationship and the parent-child relationship. All are inheritance relationships.
7. When adding a selector to your tag, do not forget to add comments to the selector in CSS. When you modify your CSS later, you will know why. We also remind you not to be crazy.
8. If you set a deep background image and a bright text effect for a label. We recommend that you set a deep background color for your tag at this time. Because the image is lost, the text can also be readable.
9. Pay attention to the order of the four states of the Link: Link Visited Hover Active
10. Use background for images unrelated to content. Always remember performance and content separation.
11. Define the color abbreviation # 8899FF = # 89F
12. table is useful in some aspects. When the content is a data table, do not hate it.
13. script does not have the language attribute. It should be written as follows:
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.