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

How to set the div border

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly introduces how to set the div frame related knowledge, the content is detailed and easy to understand, the operation is simple and fast, has a certain reference value, I believe you will gain something after reading this article on how to set the div frame, let's take a look at it.

Set up equipment and equipment div frame border skills

Set the frame for div CSS5 to introduce you to three ways.

First find the border CSS word: border

First, set the frame inside the div tag directly.

1. Div border instance code

Set equipment div frame thickness 3px, solid red border

2. Screenshot of effectiveness

3. Note that you can directly use the style attribute in the div tag and directly set the css frame of the equipment.

Second, the external CSS sets the equipment layout frame for the div.

1. CSS code

.exp {border:1px dashed # 00F}

2. HTML code

Configure div border thickness 1px, dotted blue border

3. Screenshot of an example

Specifically note that the CSS code is placed in the HTML page and the style tag is used. If you put it into an external CSS file, the CSS code is put directly into the CSS file, and the style tag is not required.

Third, set the equipment and frame fancy through the parent of div.

1. Instance CSS code

.abc div {border:4px solid # 090}

2. HTML code

I'm in DIV, but I don't have a border. I'm in DIV, and my parent is class=abc, so my DIV has a frame. I'm certainly in class=abc, but I'm not in this child div.

3. Screenshot of achievement

4. Clarify from the above example, also in div, because the parent of div is not .abc, so there is no border format. Because class=abc itself does not have the equipment to set up the CSS frame, it only sets the frame for the class=abc child div, so you can catch a glimpse of the above achievements.

This is the end of the article on "how to set the div frame". Thank you for reading! I believe you all have a certain understanding of the knowledge of "how to set div frame". If you want to learn more, you are welcome to follow 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