How to use CSS3 to implement waterfall flow layouts

Source: Internet
Author: User
This article mainly introduces the use of CSS3 to achieve waterfall Flow layout example code, small series feel very good, now share to everyone, but also for everyone to do a reference. Let's take a look at it with a little knitting.

Before using the waterfall flow to use JS, now with the CSS3, can be easily implemented.

Master points:

1. Column-count How many columns the text in P is divided into

2, column-width specified column width

3, column-gap specified column clearance

4, Break-inside:avoid; Avoid line breaks within elements and create new columns

Note: Internet Explorer 9 and earlier versions of IE browsers do not support the Column-count property.

The Column-count attribute specifies the number of columns that the element should be delimited:

P{-moz-column-count:3;  /* Firefox */-webkit-column-count:3; /* Safari and Chrome */column-count:3;}

The Column-gap property specifies the interval between columns:

p{-moz-column-gap:40px;  /* Firefox */-webkit-column-gap:40px; /* Safari and Chrome */column-gap:40px;}

The Column-rule property sets the width, style, and color rules between columns:

p{-moz-column-rule:3px outset #ff0000;/* Firefox */-webkit-column-rule:3px outset #ff0000;/* Safari and Chrome */column- rule:3px outset #ff0000;}

Instance:

<!    DOCTYPE html>

The above is the whole content of this article, I hope that everyone's learning has helped, more relevant content please pay attention to topic.alibabacloud.com!

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.