The meaning of flexible running annotation in CSS writing

Source: Internet
Author: User

If you use annotations properly, adding annotations to your CSS files can be a great help to you and others during the development process. The most common is to add hints to CSS style rules, but using annotations is also helpful for optimizing your organization and enhancing your effectiveness.

Tips and Labels

This is the most common way to annotate, and you can leave hints for yourself or other developers to avoid unnecessary confusion and trouble later on. The simplicity of this application is most important. For example:

/* Turn off borders for linked images * *

img {border:0;}

Time Stamps and signatures

Many designers and developers will mark the date time and their names in the latest updated CSS file. These will provide us with some contact information and documentation update information.

/* Styles Updated:thu 4.11.08 @ 17:15 p.m. Author:WEBJX.com ——-* *

This approach can be very useful for a project, especially if you are part of a group. The caveat is that some organizations require this information to be left in their documents, and some companies prefer to place names and dates outside of the document, so it's best to get to the point before you start.

Organization

It's a good idea to use annotations in a CSS document to indicate different chunks. For example, if all the header information is grouped together, you can use annotations to differentiate it from the following block styles.

/* HEADER —————————————————-* *

And then I'll go into that, and now we'll talk about how to "detach style types"

Comment Mark

If your CSS files are grouped according to what I said above, use the annotation tag to help you switch between parts of the document with the "Find" feature. Annotate a chapter (Chapter), such as using the equals sign "=", and then add a name for the chunk, such as HEADER, to create an "anchor" for your CSS document.

/* =header —————————————————-* *

This approach is particularly useful in the context of a complex style sheet.

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.