In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Today, the editor will share with you the relevant knowledge points about the method of setting the div frame. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.
1. Div plus four sides plus frame
1. Use css words and values
Border:1px solid # F00
Set the object border to a blood border
2. The code of div broken small instance:
Www.CSS5.com.cn.a-4 {border:1px solid # F00} is red on all sides
Screenshot of an example:
Easily set up the equipment and furnish div with 4 borders through border
Second, add a frame on the top of div
1. Apply words and values
Border-top:1px solid # F00
2. Complete example code
Www.CSS5.com.cn.a-top {border-top:1px solid # F00} configure only the top border of div
3. Screenshot of achievement
Third, add a border under the div
1. Use words and values
Border-bottom:1px solid # 000
2. Incomplete instance code
Www.CSS5.com.cn.a-bottom {border-bottom:1px solid # 000} set only the bottom border of div
3. The screenshot is configured with the bottom frame of DIV color
4. Add a border to the left of div
1. Apply words and values
Border-left:1px solid # 000
2. Complete source code
Www.CSS5.com.cn.a-left {border-left:1px solid # 000} set only the left border of the equipment div
3. Screenshot
5. Add a border to the right side of div
1. DIV's
Use words and values in the right border
Border-right:1px dashed # F00
2. Code
Www.CSS5.com.cn.a-right {border-right:3px dashed # F00} configure only the left border of div
Set up the red dotted border for the DIV equipment
3. Screenshot
6. Div has the ability to add borders on three sides
1, wisdom first set the equipment border value, that is, set the four sides of the object have a frame, that div edge does not need to set the equipment border, then configure the value of the frame to 0.
2. Complete HTML source code
Www.CSS5.com.cn.a-san {border:3px solid # F00; border-bottom:0} has a border on three sides and no border on the other side.
The lower border of the equipment setting has no frame, and the other three sides set the frame. -- the lower border does not set the border.
3. Screenshot
4, to express the need to be stable, first set 4-sided CSS, and then set up the equipment to remove the frame pattern, how the browser end, when reading from left to right, can match the first four sides, and then the lack of one side of the organization attainments. Operate the way the client read the code from left to right.
Div dotted border and solid border
In the following example code tutorial, you should see that one of the words in the value of border is solid, that is, set the border pattern to the solid line.
The commonly used dotted line compatible with major browsers is dashed, that is, the example code:
Border:1px dashed # 000
Configure the frame 1px dotted line color border (# 000 black color value, the exact color value in the real structure is obtained by PS color pickup device according to the renovating image)
These are all the contents of this article entitled "what are the methods of setting the div frame?" Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.