In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
In this article, the editor introduces in detail the method of "div width application and width setting", with detailed content, clear steps and proper handling of details. I hope that this article "div width application and width setting method" can help you solve your doubts.
Width is the style that sets the width property of the object.
Div {width:90px}
This sets the CSS width of the object div to 90px
How to use width style in DIV?
We introduce two ways to use it, one is to use the inner diameter of the div tag, and the other is the external css style to set the width width.
1. Diameter div label setting width
You can add css styles such as width by using the style attribute within the div tag.
We set the label with width and set the width of div to 480px.
1. The complete html source code is as follows:
Use instance www..com in the width tag to set the width to 480px to observe the effect, set the black CSS border, and set the css height 100. set the width width 550px css border red border in span, the height is 120.
2. Screenshot
Width is used directly within the tag using style.
Second, external CSS style uses width
The above example uses the width width attribute directly within the html tag, which we next implement using the external CSS style method.
1. Example CSS+DIV code:
Use the instance www..com .div {width:480px; border:1px solid # 000; height:100px} .spans {width:550px; border:1px solid # F00; height:120px; display:block} in the width tag to set the width to 480px to set the black CSS border in order to observe the effect, and set the css height 100. set the width width 550px css border red border in span, with a height of 120.
The instance itself still uses the width effect within the tag, but raises the CSS style within the tag to the outside of the tag to use the width width outside the tag.
2. Screenshot of effect
Read this, the "div width applications and width settings" article has been introduced, want to master the knowledge of this article also need to practice and use to understand, if you want to know more about the article, 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.
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.