In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to set margin in css". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to set margin in css".
Concept
1. Margin is an attribute in the CSS cascading style sheet that defines the extent of the white space around the border of the element.
Grammar
Margin:auto/length
Parameters.
Auto: value is set to the value of the relative edge
Length: length value consisting of floating-point numbers and unit identifiers | percentage. The percentage is based on the height of the parent object.
Matters needing attention
2. If all four parameter values are provided, they will act on the four sides in the order of top, right, bottom, and left.
If only one is provided, it will be used on all four sides.
If two are provided, the first is for top and bottom, and the second is for left and right.
If three are provided, the first is for the top, the second for the left and right, and the third for the bottom.
Example
The vertically adjacent outer margins of block-level elements are merged.
Margin div {margin: 20px; color: # fff;} .top {background: green;} .bottom {background: orange } margin: 20px margin: 20px Thank you for your reading. The above is the content of "how to set margin in css". After the study of this article, I believe you have a deeper understanding of how to set up margin in css, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.