Home >Web Front-end >HTML Tutorial >Questions about clearing floats_html/css_WEB-ITnose

Questions about clearing floats_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-24 12:13:411125browse

Dear seniors, I am a newbie. When I look at the web page template code, I often add a 0c6dc11e160d3b678d68754cc175188a under ff6d136ddc5fdfeffaf53ff6ee95f185, and then set br {clear:both;display:none;} in the css. Why? Set up like this? I tried to remove this code block and it seems that the web page has no change. Why not directly set clear: both; on the next element?


Reply to the discussion (solution)

Because you will find that line breaks will occur when setting br. When setting br after li, you will find that there will be a blank line. Blank, so let him hide. As for deletion not responding, that's probably because your width is enough. Or abnormal conditions are not met. Set on next element? ? ? ? ? What should you do if your next element floats? It is recommended that the poster increase the bonding rate

.clearfix:after{content:"Charry";height:0;clear:both;visibility:hidden;display:block;}.clearfix{display:inline-block;} /* Hides from IE-mac \*/* html .clearfix{height:1%;}.clearfix{display:block;} /* End hide from IE-mac */q:before,q:after {content:”;}abbr,acronym { border: 0;}

8fdc6267e1bc2808b41a555e740d48f4
614057cc101e4aa0b98f707436fbb758bed06894275b65c1ab86501b08a632eb
929d1f5ca49e04fdcb27f9465b944689

If the next element needs to be floated, you can use clear to clear the floating effect of the previous element, and then set float, right? hehe. . . I am a beginner, please give me some advice.

If the next element needs to be floated, you can use clear to clear the floating effect of the previous element, and then set float, isn't that okay? hehe. . . I am a beginner, please give me some advice.

Do you set a clear float on an element? ? ? Two floating categories belonging to the same category will be overwritten. . . . . . . .

If the next element needs to be floated, you can use clear to clear the floating effect of the previous element, and then set float, isn't that okay? hehe. . . I am a beginner, please give me some advice.

Do you set a clear float on an element? ? ? Two floating categories belonging to the same category will be overwritten. . . . . . . .

As I said before, the poster will increase the bonding rate. . You can’t lose your character

Thanks for the advice. hehe. I'll pay attention. . .

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn