css3 multi-column and waterfall effect sample code

高洛峰
Release: 2017-03-09 18:37:51
Original
1256 people have browsed it

This article introduces the sample code of css3 multi-column and waterfall flow effects

css3 content block, multi-column effect (similar to newspaper section layout):

.p02{    /*count:内容分为几列,gap:内容与分割线的距离,rule:分割线样式*/
    column-count:4;
    column-gap:30px;
    column-rule:5px outset #ff0000;
    -webkit-column-count: 4;
    -webkit-column-gap: 30px;
    -webkit-column-rule: 5px outset #ff0000;
}
Copy after login

css3 realizes picture waterfall flow typesetting:

.container {
    column-width: 350px;
    -webkit-column-width: 350px;
    column-gap: 5px;
    -webkit-column-gap: 5px;
}img {
    width: 400px;
}.container p {
    width: 350px;
    margin: 5px;
}p {
    text-align: center;
}
Copy after login

The waterfall flow effect html code is as follows:

<!DOCTYPE html><html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <link rel="stylesheet" type="text/css" href="pubuliu.css" />
    </head>
    <body>
        <p class="container">
            <p><img src="../../image/5.jpg" /></p>
            <p><img src="../../image/2.jpg" /><p>文字描述</p></p>
            <p><img src="../../image/5.jpg" /></p>
            <p><img src="../../image/2.jpg" /></p>
            <p><img src="../../image/5.jpg" /><p>文字描述</p></p>
            <p><img src="../../image/3.jpg" /></p>
            <p><img src="../../image/5.jpg" /></p>
            <p><img src="../../image/5.jpg" /></p>
            <p><img src="../../image/3.jpg" /></p>
            <p><img src="../../image/5.jpg" /></p>
            <p><img src="../../image/5.jpg" /><p>文字描述</p></p>
            <p><img src="../../image/5.jpg" /></p>
            <p><img src="../../image/5.jpg" /></p>
            <p><img src="../../image/5.jpg" /></p>
            <p><img src="../../image/5.jpg" /><p>文字描述</p></p>
            <p><img src="../../image/5.jpg" /></p>
            <p><img src="../../image/5.jpg" /></p>
        </p>
    </body></html>
Copy after login

The above is the detailed content of css3 multi-column and waterfall effect sample code. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!