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 methods used by DIV code

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly introduces the methods used by DIV code, which are related to knowledge, detailed and easy to understand, simple and fast operation, and certain reference value. I believe that after reading this DIV code, which articles will be harvested, let's take a look at it.

I. DIV Code Syntax

The DIV code is placed inside the less than and greater than symbols, i.e."".

A DIV is a pair of closed labels, box labels that "begin," end.

Syntax structure:

I am content.

Description: div code must have a closure if it has a beginning.

Use Start, Close.

Second, DIV nested DIV

Div tags can be nested with unlimited levels of DIV.

DIV alone

The above code, div code alone can also be, DIV nested within the DIV is also possible. DIV nesting div is very common layout, it is inevitable, common DIV+CSS layout large frame DIV on the nesting of several DIV boxes, several DIV boxes and then nested under the DIV box, to achieve a variety of web page layout.

We compare the outermost DIV to a room, and there are boxes of various sizes in the room, and small boxes can be placed in the boxes, and these big and small boxes can be regarded as DIV, so it is easier to understand this nesting from the perspective of spatial imagination.

III. DIV Layout Structure

General DIV is used to layout web page structure, such as upper and lower structure, left and right structure, more complex comprehensive structure We use DIV to layout (DIVCSS5 online VIP tutorial also provides basic structure layout graphic tutorial). In addition to using DIV layout large structure, small structure outside, corresponding to a variety of CSS styles can be set to achieve a variety of beautiful art layout.

IV. Use CSS code in div style

Div can write CSS style code directly, just need DIV code (tag) in the use of style attribute can write CSS style directly.

Case:

1. DIV code:

Hello DIVCSS5

2. Screenshot of complete case code and effect

div Write CSS Screenshots Directly

3. Complete HTML case code

DIV Direct CSS Writing DIVCSS5 Cases Hello DIVCSS5

The HTML code above can be copied directly to the browser after use.

D. ID and Class in DIV

Use id or class to set CSS style sheets in the DIV tag.

div ID and class use demonstration:

The content of this article on "DIV code use what methods" is introduced here, thank you for reading! I believe everyone has a certain understanding of the knowledge of "what methods DIV code uses." If you still want to learn more 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