In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "how to use the margin attribute of css". In the daily operation, I believe that many people have doubts about how to use the margin attribute of css. The editor consulted all kinds of materials and sorted out a simple and easy-to-use method of operation. I hope it will be helpful to answer the doubt of "how to use the margin attribute of css". Next, please follow the editor to study!
The margin attribute is the abbreviated attribute that css uses to set all margin attributes in a declaration, and margin is the distance between css control block-level elements, which are transparent and invisible.
The margin attribute includes margin left: distance from the left element block (configuration distance to the left inner margin); margin top: distance from the top (top) element block (setting the equipment from the top element block interval); margin right: distance from the right element block (setting the distance from the right element block); and margin bottom: bottom element block interval (setting the distance from the lower (lower) element block). The two-dimensional construction diagram can be seen in the CSS attribute two-dimensional diagram.
Dissecting diagram of margin
Margin left usage: margin-left:10px; this meaning interval left element block distance 10 pixels, can be compared with the percentage square (margin-left:10%; separates the left element block 10% distance) css margin-left tutorial
Margin right usage: the meaning of margin-right:10px; is 10 pixels away from the element block on the right, which can be separated with a percentage, for example (margin-right:10%; is separated by 10% of the element block on the right)
Margin top usage: the meaning of margin-top:10px; is 10 pixels away from the top edge element block, and can be css margin-top with the percentage square (margin-top:10%; 10% distance from the top edge element block)
Margin bottom usage: margin-bottom:10px; means 10 pixels away from the lower edge element block, which can be compared to the percentage (margin-bottom:10%; 10% distance from the bottom edge element block) css margin-bottom
Note the link "-" in the middle of the margin. When setting the distance value of the equipment, use ":" and pay the value, and end with ";", and all in lowercase half-corner letters.
It is assumed that the left and right sides need to configure the value of margin may be abbreviated to achieve, in order to beautify the css.
For example, the abbreviations are as follows:
Margin:10px; means that the isolation distance of upper and lower dominant element blocks is 10px (10 pixels) equals margin-top:10px; margin-bottom:10px; margin-left:10px; margin-right:10px;.
Margin:5px 10px; it means that the upper and lower element blocks are separated as 5px, and the dominant element block isolation distance is 10px, which is the same as margin-top:5px; margin-bottom:5px; margin-left:10px; margin-right:10px;.
Margin:5px 6px 7px; in the sense, the distance of the element block is 5px, the isolation distance of the lower element block is 7PX, and the distance of the dominant element block is 6px, which is equal to the abbreviation of margin-top:5px; margin-bottom:7px; margin-left:6px; margin-right:6px;.
Margin:5px 6px 7px 8px; in meaning, the element block is 5px, the distance of the right element block is 6px, the bottom element block is 7px, and the left element block is 8px, which is the same as margin-top:5px; margin-right:6px; margin-bottom:7px; margin-right:8px;.
At this point, the study on "how to use the margin attribute of css" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.