In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the use of the clear attribute in css, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand it.
How do I use the cssclear attribute?
The clear attribute specifies which side of the element does not allow other floating elements.
Syntax:
Clear:left | right | both | none | inherit
Attribute value:
● left: floating elements are not allowed on the left.
● right: floating elements are not allowed on the right.
● both: floating elements are not allowed on the left and right sides.
● none: default value. Allow floating elements to appear on both sides.
● inherit: specifies that the value of the clear attribute should be inherited from the parent element.
Description:
The clear attribute defines which side of the element is not allowed to float. In CSS1 and CSS2, this is achieved by automatically increasing the top margin for clear elements (that is, elements with the clear attribute set). In CSS2.1, the cleanup space is added above the outer margin of the element, but the outer margin itself does not change.
No matter which change, the end result is the same, and if declared to be cleared on the left or right, the upper outer border of the element is just below the lower outer margin of the floating element on that edge.
Note: all major browsers support the clear attribute. No version of InternetExplorer (including IE8) supports the attribute value "inherit".
Example of cssclear property
Img
{
Float:left
}
P.clear
{
Clear:both
}
Thisissometext.Thisissometext.Thisissometext.Thisissometext.Thisissometext.Thisissometext.
Thisisalsosometext.Thisisalsosometext.Thisisalsosometext.Thisisalsosometext.Thisisalsosometext.
Use clear:both to clear floats:
Thisissometext.Thisissometext.Thisissometext.Thisissometext.Thisissometext.Thisissometext.
Thisisalsosometext.Thisisalsosometext.Thisisalsosometext.Thisisalsosometext.Thisisalsosometext.
Thank you for reading this article carefully. I hope the article "what is the use of clear attributes in css" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.