Css--display:flex

Source: Internet
Author: User

Flex is the abbreviation for flexible box, meaning "resilient layout", which provides maximum flexibility for box-shaped models.

When set to flex layout, the, and attributes of the child elements float clear vertical-align are invalidated. It can be applied to a container, or it can be applied to inline elements. (explained in conjunction with developer tools) in 2009, the website presented a new solution----flex layout that enables easy, complete and responsive layout of various pages. Currently, it has been supported by all browsers, which means that this feature is now safe to use.

<! DOCTYPE html>. Father {width:600px;            height:300px; Background-color: #b6ff00;            Display:flex; /*Flex-flow:column;*/Flex-Flow:row; }. Father. Son1 {flex:1; border:1px Solid #000000;                }. Father. son2 {width:500px; border:1px Solid #000000; }. Father. Son3 {flex:1; border:1px Solid #000000; }    </style>

The parent tag sets the Dispaly:flex after the default scaling direction is from sitting to right. When the sub-tag is set flex:1 the child elements are evenly distributed in the telescopic direction.

Reference: Dispaly, talking about the flex layout of display properties in CSS3

Css--display:flex

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.