Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Case Analysis of DIV CSS Writing format

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Most people do not understand the knowledge points of this "DIV CSS Writing format example Analysis" article, so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "DIV CSS Writing format case Analysis" article.

1. DIV writing format

Div is written in html files, and orderly arrangement and indentation will help development and future maintenance. Typical indentation example:

Quality content, middle left content, middle right content, bottom copyright content.

Note the above code indentation-there is relative indentation between the parent and the child. Generally indent 4 space characters in half-corner English position.

2. CSS writing format

A good CSS writing format can bring you convenience in maintenance and production. You can analyze the relationships between CSS-named selectors.

# main {......}

# main # header {......}

# main # centen {......}

# main # footer {......}

# centen .cent _ left {......}

# centen .cent _ right {......}

The inner values of the above curly braces are omitted here. This is mainly a CSS-derived relationship, with DIV blocks in different regions separated by a blank line.

The CSS format also has

# main {

......

}

# main # header {

......

}

# main # centen {

......

}

# main # footer {

......

}

# centen .cent _ left {

......

}

# centen .cent _ right {

......

}

It is generally not recommended that CSS curly braces arrange CSS selectors on a single line. At the same time, this will greatly increase the number of lines in the CSS file, and it is difficult to identify the maintenance.

The above is about the content of this article on "case Analysis of DIV CSS Writing format". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more related knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report