国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > CSS > 正文

CSS3實例教程:CSS3實現圖片瀑布布局效果

2024-07-11 08:22:51
字體:
來源:轉載
供稿:網友
網頁制作文章簡介:以前就覺得,Chinaz中圖片瀑布布局很好看,以前也看過別人實現的一些方法,大部分是用js實現的,今天試了一下,用CSS3簡單的實現了類似的布局效果.

以前就覺得,Chinaz中圖片瀑布布局很好看,以前也看過別人實現的一些方法,大部分是用js實現的,今天試了一下,用CSS3簡單的實現了類似的布局效果

下面是我用css實現的:


<!DOCTYPE HTML>
 
<html>
 
<head>
 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 
<title>CSS3瀑布布局</title>
 
<style>
 
        .container{
 
                -webkit-column-width:160px;
 
                -moz-column-width:160px;
 
                -o-colum-width:160px;
 
                -webkit-column-gap:1px;
 
                -moz-column-gap:1px;
 
                -o-column-gap:1px;
 
        }
 
        div:not(.container){
 
                -webkit-border-radius:5px;
 
                -moz-border-radius:5px;
 
                border-radius:5px;
 
                background:#D9D9D9;
 
                border::#CCC 1px solid;
 
                display:inline-block;
 
                width:157px;
 
                position:relative;
 
                margin:2px;
 
        }
 
        .title{
 
                 line-height:80px; font-size:18px; color:#900;
 
                 text-align:center;
 
                 font-family:"Microsoft YaHei";
 
        }
 
</style>
 
</head>
 

<body>
 
<section>
 
        <div class="container">
 
            <div style="height:80px" class="title">純CSS3瀑布布局</div>
 
        <div style="height:260px"></div>
 
        <div style="height:65px"></div>
 
        <div style="height:120px"></div>
 
        <div style="height:145px"></div>
 
        <div style="height:90px"></div>
 
        <div style="height:145px"></div>
 
        <div style="height:160px"></div>
 
        <div style="height:65px"></div>
 
        <div style="height:230px"></div>
 
        <div style="height:140px"></div>
 
        <div style="height:85px"></div>
 
        <div style="height:20px"></div>
 
        <div style="height:145px"></div>
 
        <div style="height:50px"></div>
 
              <div style="height:65px"></div>
 
        <div style="height:230px"></div>
 
        <div style="height:140px"></div>
 
        <div style="height:85px"></div>
 
        <div style="height:20px"></div>
 
        <div style="height:145px"></div>
 
        <div style="height:50px"></div>
 
        <div style="height:145px"></div>
 
        <div style="height:160px"></div>
 
        <div style="height:240px"></div>
 
    </div>
 
</section>
 
</body>
 
</html>

運行效果(FireFox,Google Chrome下測試通過,其他瀏覽器未做測試~~):

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 衡东县| 简阳市| 成安县| 镇坪县| 滕州市| 康平县| 米易县| 青海省| 进贤县| 新野县| 青冈县| 泉州市| 福鼎市| 翁牛特旗| 灌云县| 遵化市| 四川省| 安溪县| 泾川县| 栾川县| 乳山市| 隆尧县| 新竹市| 封丘县| 雷山县| 沂水县| 鹤山市| 铜川市| 鄯善县| 遂昌县| 乌拉特前旗| 汝州市| 政和县| 应用必备| 西城区| 渑池县| 兴安盟| 化州市| 普定县| 那曲县| 湘西|