Home >Web Front-end >HTML Tutorial >Questions about clearing floats_html/css_WEB-ITnose
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?
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;}
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. . .