The relationship between the UL height collapse caused by float float and the overflow

Source: Internet
Author: User
Today's problems really make people have to spit, because a very small problem, it took a half a day to solve the problem. Always think that their HTML and CSS understanding should be pretty good, but the things I met today let me have to reflect on their own learning mentality error. HTML and CSS problems are big problems, because once the layout of the error, often not their own code is not a problem, but their own concept of a browser does not understand the resulting error. This tells us that to continue to practice, to encounter problems in order to allow us to understand the many principles of the browser more profound. Do not think you learn the same, in fact, you happen to be in the position of not getting started. So be sure to always keep a humble mind to learn, you can learn more things. The problem today arises when using CSS3 to write accordion effects. Error: When this error occurs, always do not understand where the problem appears, because they set up the ul:hover, so once the mouse appears in the UL, all Li will be reduced. And here if UL has height, it will appear, the text part of the figure because UL has height, so will all the Li narrow. So here to use the role of UL collapse, once UL has no height, then there is no blank part of it. And because Li is also part of the UL, so it will change. But their careless use of the overflow, so that the floating closed, which led to the high UL. Later in the http://www.iyunlu.com/view/css-xhtml/55.html learned to clear the principle of floating, just know where they are wrong. This is a very clever use of the UL of the height of the crash, it can be seen that this is not necessarily a bug, and sometimes instead of using this shortcoming to achieve our purpose. In fact, sometimes technology is not the real limit, and thinking is the real limit. Also, don't be afraid to make mistakes, because every mistake is your chance to re-learn.

The relationship between the UL height collapse caused by float float and the overflow

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.