The characteristics of floating in CSS

Source: Internet
Author: User

After we set the label to float, there are a few features

1 float will break out of standard stream

If an element is displayed in the normal standard flow, it occupies a position in the HTML, and the following element follows it, but the float is separated from the standard stream, and after we see the floating element, we cannot judge it in the normal standard stream.


2 floating elements affect the elements below and do not affect the elements above

<! DOCTYPE html>

3 fluctuations affect how elements are displayed

Whether the element is an inline element or a block-level element, the set float is displayed in the same line when it is displayed in the future, unless the row is not fit to appear in the second row

After the floating element is able to set the wide height

<! DOCTYPE html>


Related Article

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.