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

What are the skills of CSS DIV

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

Share

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

This article focuses on "what are the CSS DIV skills". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "what are the CSS DIV skills"?

CSS first needs to understand block-level elements (blockelement). Each block-level element occupies a row by default, and only one block element can be added to the same line (except for float). Block-level elements can generally be nested within block-level elements or inline elements, such as using CSSDIV layouts.

What are the CSSDIV skills?

When we write font styles, we might write like this.

Font-size:1em

Line-height:1.5em

Font-weight:bold

Font-style:italic

Font-variant:small-caps

Font-family:verdana,serif

In fact, it is completely superfluous to write like this. I can just use font to write OK.

For example:

Font:1em/1.5embolditalicsmall-capsverdana,serif

Write several class attributes together. -TOP

Usually it is written that the class in the property has only one value, but this is not an accident that you can only give it

If you assign one class name, we can assign more than 2. such as

...

However, it is important to note that they are separated by spaces in class, not ",", which requires attention. If this is used, then the class of text and side will be applied to the p element.

What about CSSDIV's skills?

Default value for border for CSS-TOP

Border is the value of the border. When I am doing project development, I am used to doing this:

Border:1pxsolidred

The first refers to the size of the box, the second refers to the style, and the third refers to the color. However, not all three are required, and you have to use the border style. The other two have default values.

For example, you write like this:

Border:solid

If you write this, the default value for the first size is: medium (relative to 3px or 4px) and color refers to the color in the text.

! important will be ignored in IE-TOP

Because of the incompatibility between browsers, when we write css, in order to ensure that the website can be in each

Browsers are compatible, so we need to use the property! important.

If you use this in css, it takes precedence over attributes of the same name.

This is for browsers other than IE.

such as

Marvell topvu 3.5 emblem importantentente Martina color topvu 2em

What I mean above is that the browser other than IE is 3.5em and IE is 2em. This is very useful.

At this point, I believe you have a deeper understanding of "CSS DIV skills", you might as well come to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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