In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article is about what margin means in html. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
In html, margin means "margin", which refers to the white space around the border of the element; setting the margin creates additional "white space" outside the element, leaving a "blank" distance between the box and the box. Setting the margin requires the use of the css margin property, which accepts any unit of length, percentage value, or even negative value.
The operating environment of this tutorial: windows7 system, CSS3&&HTML5 version, Dell G3 computer.
In html, margin means "margin", which refers to the blank area around the border of an element.
Setting the margin creates additional "white space" outside the element, leaving a "blank" distance between the box and the box.
The easiest way to set the margin is to use the margin property, which accepts any unit of length, percentage, or even negative value.
The margin property accepts any unit of length, which can be pixels, inches, millimeters, or em.
Margin can be set to auto. A more common practice is to set the length value for the outer margin. The following declaration sets a 4-inch wide white space of 1 inch on each side of the H2 element:
H2 {margin: 0.25in;}
The following example defines different outer margins for the four sides of the H2 element, using px units:
H2 {margin: 10px 0px 15px 5px;}
As with the inner margin setting, the order of these values is to rotate clockwise around the element starting with the top and outer margin (top):
Margin: top right bottom left
Alternatively, you can set a percentage value for margin:
P {margin: 10%;}
The percentage is calculated relative to the width of the parent element. In the above example, the outer margin set for the p element is 10% of the width of its parent element.
The default value for margin is 0, so if you don't declare a value for margin, there will be no margins. In practice, however, browsers already provide predetermined styles for many elements, and outmargins are no exception. For example, in browsers that support CSS, margins generate "blank lines" above and below each paragraph element. Therefore, if the outer margin is not declared for the p element, the browser may apply an outer margin on its own. Of course, as long as you make a special declaration, the default style will be overwritten.
Thank you for reading! This is the end of the article on "what does margin mean in html?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
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.