관리 메뉴

moozi

masonry.html 본문

TIS_2017/응용sw_1기

masonry.html

moozi 2017. 1. 24. 13:59

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Masonry Plugin</title>
    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
    <script src="https://unpkg.com/masonry-layout@4/dist/masonry.pkgd.min.js"></script>
    <style>
        *{ margin:0; padding:0}
        body{
            background: gray;
        }
        .item{
            margin: 5px;
            width:100px;
            height: 100px;
            background-color: white;
            border-radius: 10px;
            float:left;
        }
        .big{width:210px;height: 430px;}
        .normal{width:210px;height: 210px;}
        .small{width:100px;height: 100px;}
    </style>
    <script>
        $(function(){
            $("#masonry-container").masonry({
                itemSelector:'.item',
                columnWidth:110,
                isAnimated:true
            });  
       
        });
    </script>
</head>
<body>
    <div id="masonry-container">
        <div class="item small"></div>
        <div class="item big"></div>
        <div class="item small"></div>
        <div class="item normal"></div>
        <div class="item normal"></div>
        <div class="item small"></div>
        <div class="item small"></div>
        <div class="item big"></div>
        <div class="item big"></div>
        <div class="item small"></div>
    </div>
</body>
</html>

'TIS_2017 > 응용sw_1기' 카테고리의 다른 글

미니프로젝트 부트스트랩을 사용한 개인포트폴리오사이트  (18) 2017.01.25
angularJS연습문제01  (0) 2017.01.25
ajax연습문제01  (0) 2017.01.23
moozi slider  (0) 2017.01.20
jQuery연습문제02  (0) 2017.01.20
Comments