Notice
Recent Posts
Recent Comments
Link
«   2024/12   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

히바리 쿄야 와 함께 하는 Developer Cafe

[4일차] DO IT 반응형 웹 만들기/p247 ~ p336/09 반응형 웹 사이트 준비 작업하기 본문

Resposive Web

[4일차] DO IT 반응형 웹 만들기/p247 ~ p336/09 반응형 웹 사이트 준비 작업하기

TWICE&GFRIEND 2021. 2. 16. 20:23
<!DOCTYPE HTML>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
<title>INDIGO</title>
<link rel="stylesheet" type="text/css" href="css/reset.css">
<link rel="stylesheet" type="text/css" href="css/default.css">
<link rel="shortcut icon" href="images/favicon/favicon.ico">
<link rel="stylesheet" type="text/css" href="css/main.css">
<link rel="apple-touch-icon-precomposed" href="images/favicon/indigo-touch-icon.png">
<script src="js/jquery.min.js"></script>
<script src="js/indigo.min.js"></script>
</head>
<body>
    <div id="wrap">
        <header class="header cfixed">
            <h1 class="logo"><a href="">INDIGO</a></h1>
            <nav>
                <ul class="gnb">
                    <li><a href="">HOME</a></li>
                    <li><a href="">WE ARE</a></li>
                    <li><a href="">WORK</a></li>
                    <li><a href="">BLOG</a></li>
                    <li><a href="">CONTACT US</a></li>
                </ul>
            </nav>
            <span class="menu-toggle-btn">
                <span></span>
                <span></span>
                <span></span>
            </span>
        </header>
        <article class="slider">
            <img src="images/p-images/slide01.jpg" alt="">
        </article>
        <section class="content">
            <section class="display-section">
                <div class="container">
                    <h2 class="sec-tit">WE ARE</h2>
                    <p class="desc">Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a<br>piece of classical Latin literature from 45 BC, making it over 2000 years old.</p>
                </div>
            </section>
            <section class="promotion-section">
                <div class="container">
                    <ul class="promo-list">
                        <li>
                            <a href="">
                                <img src="images/s-images/promo01.png" alt="">
                                <h3>HOME</h3>
                                <p>Lorem Ipsum is simply dummy text of
the printing and typesetting industry.</p>
                            </a>
                        </li>
                        <li>
                            <a href="">
                                <img src="images/s-images/promo02.png" alt="">
                                <h3>WE ARE</h3>
                                <p>Lorem Ipsum is simply dummy text of
the printing and typesetting industry.</p>
                            </a>
                        </li>
                        <li>
                            <a href="">
                                <img src="images/s-images/promo03.png" alt="">
                                <h3>WORK</h3>
                                <p>Lorem Ipsum is simply dummy text of
the printing and typesetting industry.</p>
                            </a>
                        </li>
                        <li>
                            <a href="">
                                <img src="images/s-images/promo04.png" alt="">
                                <h3>BLOG</h3>
                                <p>Lorem Ipsum is simply dummy text of
the printing and typesetting industry.</p>
                            </a>
                        </li>
                    </ul>
                </div>
            </section>
            <hr class="divider">
            <section class="work-section cfixed">
                <h2 class="sec-tit">WORK</h2>
                <ul class="work-list">
                    <li>
                        <a href="">
                            <div class="info">
                                <h3>Running</h3>
                                <span>WEB/PRINT</span>
                            </div>
                            <img src="images/p-images/work01.jpg" alt="">
                        </a>
                    </li>
                    <li>
                        <a href="">
                            <div class="info">
                                <h3>Rugby</h3>
                                <span>WEB/PRINT</span>
                            </div>
                            <img src="images/p-images/work02.jpg" alt="">
                        </a>
                    </li>
                    <li>
                        <a href="">
                            <div class="info">
                                <h3>Weight</h3>
                                <span>WEB/PRINT</span>
                            </div>
                            <img src="images/p-images/work03.jpg" alt="">
                        </a>
                    </li>
                    <li>
                        <a href="">
                            <div class="info">
                                <h3>Marathon</h3>
                                <span>WEB/PRINT</span>
                            </div>
                            <img src="images/p-images/work04.jpg" alt="">
                        </a>
                    </li>
                    <li>
                        <a href="">
                            <div class="info">
                                <h3>Boxing</h3>
                                <span>WEB/PRINT</span>
                            </div>
                            <img src="images/p-images/work05.jpg" alt="">
                        </a>
                    </li>
                    <li>
                        <a href="">
                            <div class="info">
                                <h3>Ice Hockey</h3>
                                <span>WEB/PRINT</span>
                            </div>
                            <img src="images/p-images/work06.jpg" alt="">
                        </a>
                    </li>
                    <li>
                        <a href="">
                            <div class="info">
                                <h3>Skate Board</h3>
                                <span>WEB/PRINT</span>
                            </div>
                            <img src="images/p-images/work07.jpg" alt="">
                        </a>
                    </li>
                    <li>
                        <a href="">
                            <div class="info">
                                <h3>Basketball</h3>
                                <span>WEB/PRINT</span>
                            </div>
                            <img src="images/p-images/work08.jpg" alt="">
                        </a>
                    </li>
                </ul>
            </section>
            <hr class="m-divider">
            <section class="blog-section">
                <div class="container">
                    <h2 class="sec-tit">BLOG</h2>
                    <ul class="blog-list">
                        <li>
                            <a href=""><img src="images/p-images/blog01.jpg" alt=""></a>
                            <time datetime="2016-10-30">OCT 30, 2016</time>
                            <a href=""><h3>There are many variations of passages of Lorem Ipsum</h3></a>
                        </li>
                        <li>
                            <a href=""><img src="images/p-images/blog02.jpg" alt=""></a>
                            <time datetime="2016-10-30">OCT 30, 2016</time>
                            <a href=""><h3>There are many variations of passages of Lorem Ipsum</h3></a>
                        </li>
                        <li>
                            <a href=""><img src="images/p-images/blog03.jpg" alt=""></a>
                            <time datetime="2016-10-30">OCT 30, 2016</time>
                            <a href=""><h3>There are many variations of passages of Lorem Ipsum</h3></a>
                        </li>
                    </ul>
                </div>
            </section>
            <section class="contact-section">
                <div class="container">
                    <h2 class="sec-tit">CONTACT</h2>
                    <div class="form-box">
                        <form action="" method="">
                            <fieldset class="cfixed">
                                <legend class="blind">CONTACT US</legend>
                                <div class="form">
                                    <label for="name" class="blind">name</label>
                                    <input type="text" id="name" placeholder="Name">
                                    <label for="phone" class="blind">phone</label>
                                    <input type="tel" id="phone" placeholder="Phone">
                                    <label for="email" class="blind">email</label>
                                    <input type="email" id="email" placeholder="Email Address">
                                </div>
                                <div class="textarea">
                                    <label for="message" class="blind">message</label>
                                    <textarea name="message" id="message" placeholder="Message"></textarea>
                                </div>
                            </fieldset>
                            <div class="send-btn">
                                <button>SEND MASSAGE</button>
                            </div>
                        </form>
                    </div>
                </div>
            </section>
        </section>
        <footer class="footer">
            <iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3162.111677235935!2d126.97473421573828!3d37.575987879796195!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x357ca2eaa19c763d%3A0xb28a32722d675764!2z6rSR7ZmU66y4KEd3YW5naHdhbXVuIEdhdGUp!5e0!3m2!1sko!2skr!4v1481946656451" frameborder="0" style="border:0" allowfullscreen></iframe>
            <p class="copyright">INDIGO</p>
        </footer>
    </div>
</body>
</html>

index.html

 

 

@charset "utf-8";

/* 모바일용 CSS */
/* 기본 CSS */
.container{
width:90%;
max-width:1132px;
margin:0 auto;
}

.cfixed:after, .container:after{
display:block;
content:"";
clear:both;
}

.blind{
position:absolute;
width:0;
height:0;
line-height:0;
text-indent:-9999px;
overflow:hidden;
}

.sec-tit{
font-size:42px;
color:#3f51b5;
font-weight:normal;
}

.divider{
width:90%;
max-width:1132px;
margin:0 auto;
margin-top:77px;
background:#eee;
}

.m-divider{
width:20px;
margin:0 auto;
margin-top:77px;
background:#3f51b5;
}

/* 헤더 영역 CSS */
.header{
position:relative;
padding:18px 5%;
}

.header .logo{
float:left;
}

.header .logo a{
font-size:26px;
color:#3f51b5;
font-weight:normal;
}

.header .gnb{
display:none;
position:absolute;
top:100%;
left:0;
width:100%;
background:#3f51b5;
}

.header .gnb li{
border-bottom:1px solid #303f9f;
}

.header .gnb li a{
display:block;
padding:14px 0 14px 5%;
font-size:14px;
color:#fff;
}

.header .menu-toggle-btn{
float:right;
width:20px;
margin-top:4px;
cursor:pointer;
}

.header .menu-toggle-btn span{
display:block;
width:100%;
height:2px;
background:#3f51b5;
}

.header .menu-toggle-btn span:nth-child(2){
margin:5px 0;
}

/* 슬라이더 영역 CSS */
.slider img{
display:block;
width:100%;
max-width:100%;
height:auto;
}

/* 디스플레이 영역 CSS */
.display-section{
margin-top:59px;
text-align:center;
}

.display-section .sec-tit{
margin-bottom:30px;
}

.display-section .desc{
font-family:'PT Serif';
color:#616161;
line-height:1.9;
}

/* 프로모션 영역 CSS */
.promotion-section{
margin-top:68px;
}

.promotion-section .promo-list li{
margin-top:52px;
text-align:center;
}

.promotion-section .promo-list li:first-child{
margin-top:0;
}

.promotion-section .promo-list li img{
height:52px;
}

.promotion-section .promo-list li h3{
margin:29px 0 20px 0;
color:#3f51b5;
font-weight:normal;
}

.promotion-section .promo-list li p{
font-size:14px;
font-family:'PT Serif';
color:#616161;
line-height:1.5;
}

/* 최근 작업 영역 CSS */
.work-section{
margin-top:73px;
}

.work-section .sec-tit{
width:90%;
max-width:1132px;
margin:0 auto;
margin-bottom:47px;
text-align:center;
}

.work-section .work-list li{
width:100%;
}

.work-section .work-list li a{
display:block;
position:relative;
width:100%;
height:100%;
}

.work-section .work-list li a:before{
display:block;
position:absolute;
top:0;
left:0;
z-index:10;
width:100%;
height:100%;
background:#3f51b5;
content:"";
opacity:0;
transition:all 0.2s;
}

.work-section .work-list li a:hover:before{
opacity:0.86;
}

.work-section .work-list li .info{
position:absolute;
top:0;
left:23px;
z-index:20;
opacity:0;
transition:all 0.3s;
}

.work-section .work-list li a:hover .info{
transform:translateY(23px);
opacity:1;
}

.work-section .work-list li .info h3{
margin-bottom:8px;
font-size:23px;
color:#fff;
font-weight:normal;
}

.work-section .work-list li .info span{
font-size:11px;
color:#fff;
}

.work-section .work-list li img{
display:block;
width:100%;
max-width:100%;
height:auto;
}

/* 최근 글 영역 CSS */
.blog-section{
margin-top:77px;
}

.blog-section .sec-tit{
margin-bottom:47px;
text-align:center;
}

.blog-section .blog-list li{
width:100%;
margin-top:45px;
}

.blog-section .blog-list li:first-child{
margin-top:0;
}

.blog-section .blog-list li img{
display:block;
width:100%;
max-width:100%;
height:auto;
}

.blog-section .blog-list li time{
display:block;
margin:11px 0 10px 0;
font-size:11px;
color:#9e9e9e;
}

.blog-section .blog-list li h3{
color:#424242;
font-weight:normal;
line-height:1.6;
}

/* 연락처 영역 CSS */
.contact-section{
margin-top:109px;
}

.contact-section .sec-tit{
margin-bottom:47px;
text-align:center;
}

.contact-section .form-box .form input{
padding-bottom:13px;
margin-bottom:38px;
}

.contact-section .form-box .textarea textarea{
height:165px;
}

.contact-section .form-box .send-btn{
margin-top:36px;
text-align:right;
}

.contact-section .form-box .send-btn button{
padding:15px;
margin:0;
border:0;
font-size:12px;
color:#fff;
background:#3f51b5;
font-family:'Montserrat';
cursor:pointer;
}

/* 푸터 영역 CSS */
.footer{
margin-top:104px;
}

.footer iframe{
width:100%;
height:320px;
}

.footer p{
margin:21px 0;
color:#3f51b5;
text-align:center;
}

/* 태블릿용 CSS */
@media all and (min-width:768px){

/* 기본 CSS */
.divider{
margin-top:124px;
}

.m-divider{
margin-top:124px;
}

/* 헤더 영역 CSS */
.header{
position:static;
padding:28px 52px;
}

.header .gnb{
display:block !important;
position:static;
float:right;
width:auto;
margin-top:6px;
background:none;
}

.header .gnb li{
float:left;
margin-left:21px;
border-bottom:0;
}

.header .gnb li a{
padding:0;
font-size:16px;
color:#3f51b5;
}

.header .menu-toggle-btn{
display:none !important;
}

/* 디스플레이 영역 CSS */
.display-section{
margin-top:95px;
}

/* 프로모션 영역 CSS */
.promotion-section{
margin-top:110px;
}

.promotion-section .promo-list li{
float:left;
width:23.046875%;
/* 177px ÷ 768px*/
margin-left:2.604166666666667%;
/* 20px ÷ 768px*/
margin-top:0;
}

.promotion-section .promo-list li:first-child{
margin-left:0;
}

/* 최근 작업 영역 CSS */
.work-section{
margin-top:118px;
}

.work-section .sec-tit{
margin-bottom:76px;
}

.work-section .work-list li{
float:left;
width:50%;
}

.work-section .work-list li .info{
left:37px;
}

.work-section .work-list li a:hover .info{
transform:translateY(37px);
}

/* 최근 글 영역 CSS */
.blog-section{
margin-top:124px;
}

.blog-section .sec-tit{
margin-bottom:76px;
}

.blog-section .blog-list li{
float:left;
width:31.59722222222222%;
/* 242.6666666666667px ÷ 768px*/
margin-left:2.604166666666667%;
/* 20px ÷ 768px*/
margin-top:0;
}

.blog-section .blog-list li:first-child{
margin-left:0;
}

/* 연락처 영역 CSS */
.contact-section{
margin-top:176px;
}

.contact-section .sec-tit{
margin-bottom:76px;
}

.contact-section .form-box .form, .contact-section .form-box .textarea{
float:left;
width:48.69791666666667%;
/* 374px ÷ 768px*/
}

.contact-section .form-box .form{
margin-right:2.604166666666667%;
/* 20px ÷ 768px*/
}

.contact-section .form-box .form input:last-child{
margin-bottom:0;
}

/* 푸터 영역 CSS */
.footer iframe{
height:432px;
}

.footer p{
margin:34px 0;
}
}

/* PC용 CSS */
@media all and (min-width:1132px){

/* 디스플레이 영역 CSS */
.display-section{
text-align:left;
}

.display-section .sec-tit{
float:left;
margin-bottom:0;
}

.display-section .desc{
position:relative;
float:right;
padding-left:20px;
font-family:'PT Serif';
color:#616161;
line-height:1.9;
}

.display-section .desc:before{
display:block;
position:absolute;
top:9px;
left:0;
width:2px;
height:44px;
background:#e0e0e0;
content:"";
}

/* 프로모션 영역 CSS */
.promotion-section .promo-list li{
width:23.67491166077739%;
/* 268px ÷ 1132px*/
margin-left:1.76678445229682%;
/* 20px ÷ 1132px*/
}

/* 최근 작업 영역 CSS */
.work-section .sec-tit{
text-align:left;
}

.work-section .work-list li{
width:25%;
}

/* 최근 글 영역 CSS */
.blog-section .sec-tit{
float:left;
margin-bottom:0;
}

.blog-section .blog-list{
float:right;
width:74.5583038869258%;
/* 844px ÷ 1132px*/
}

.blog-section .blog-list li{
width:31.75355450236967%;
/* 268px ÷ 844px*/
margin-left:2.369668246445498%;
/* 20px ÷ 844px*/
}

/* 연락처 영역 CSS */
.contact-section .sec-tit{
float:left;
margin-bottom:0;
}

.contact-section .form-box{
float:right;
width:74.5583038869258%;
/* 844px ÷ 1132px*/
}

.contact-section .form-box .form, .contact-section .form-box .textarea{
width:48.81516587677725%;
/* 412px ÷ 844px*/
}

.contact-section .form-box .form{
margin-right:2.369668246445498%;
/* 20px ÷ 844px*/
}
}

main.css

 

 

@charset utf-8;

/* 웹폰트 CSS */
@import url('https://fonts.googleapis.com/css?family=Montserrat|PT+Serif');

/* CSS 초기화 */
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video{
margin:0;
padding:0;
border:0;
outline:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}

body{
font-family:'Montserrat',DroidSans,AppleSDGothicNeo,Sans-serif,Helvetica;
line-height:1;
}

article,aside,details,figcaption,figure, footer,header,hgroup,menu,nav,section{
display:block;
}

nav ul, li{
list-style:none;
}

a{
margin:0;
padding:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
text-decoration:none;
}

img{
vertical-align:top;
}

hr{
display:block;
height:2px;
border:0;
margin:0;
padding:0;
}

input, textarea{
width:100%;
margin:0;
padding:0;
border:0;
border-bottom:1px solid #757575;
color:#3f51b5;
font-family:'Montserrat';
font-size:12px;
vertical-align:top;
border-radius:0;
box-sizing:content-box;
appearance:none;
}

::-moz-input-placeholder, ::-moz-textarea-placeholder{
color:#3f51b5;
}

::-webkit-input-placeholder, ::-webkit-textarea-placeholder{
color:#3f51b5;
}

reset.css

 

 

jQuery(function($){
    $(".menu-toggle-btn").click(function(){
        $(".gnb").stop().slideToggle("fast");
    });
});

indigo.js

 

 

Comments