1. 주제선정

2. 디자인모델링

 

스케치

웹문서 / 그림파일로 : 와이어프레임 - 뼈대만 폰트x 그림x

목업 : 기능은 없지만 보기에는 완성

프로토타입 : 자바스크랩트 , 동작하는 웹페이지 자체, 프론트쪽에서는 거의 완성

                 시험적프로토타입 - 1회용

                 이어나가는 프로토타입

스토리보드 : 최종문서

 

https://balsamiq.com/wireframes/

 

Balsamiq Wireframes | Balsamiq

Balsamiq Wireframes is the industry standard quick and easy low-fidelity UI wireframing tool. It makes work fun!

balsamiq.com

카카오오븐

https://ovenapp.io/

 

OvenApp.io

Oven(오븐)은 HTML5 기반의 무료 웹/앱 프로토타이핑 툴입니다. (카카오 제공)

ovenapp.io

네이버??

 


test1

더보기
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;700;900&display=swap" rel="stylesheet">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css">
        <style>

            *{
                box-sizing: border-box;
                text-align: center;
                color: white;
                font-family: 'Noto Sans KR', sans-serif;
                font-size: 20px;
                font-weight: 500;

            }
            div{
                /*                border: 1px dotted white;*/
            }
            body{
                padding: 0;
                margin: 0;
                background-color: black;
                position: relative;

            }

            .wrapper{
                width: 1200px;
                margin: auto;
                position: relative;
                top: 100px;

            }

            .text1{
                font-size: 50px;
                font-weight: 900;
            }
            .contents{
                margin: auto;
            }
            .footer{
                height: 5px;
                background-color: #131024;
            }
            
            .name{
                background-color:#E50914 ;
                width: 336px;
                margin: auto;
            }

            .menu-bar{
                position: fixed;
                left: -220px;
                z-index: 10;
                background-color: #131024;
                width: 250px;
                height: 100%;
                
            }
            .menu-bar:hover{
                position: fixed;
                left: 0px;
                z-index: 10;
                transition-duration: 0.5s;
            }

            .menu-bar li{
                position: relative;
                list-style: none;
                line-height: 100px;
                left: -10px;
                float: left;
                width: 100%;
            }

            .menu-bar a{
                text-decoration: none;
            }
            .poli-menu:hover{
                background-image: url(politician.webp)
            }
            .you-menu:hover{
                background-image: url(yougif.webp)            }
            .santa-menu:hover{
                background-image: url(santagif.webp)
            }
            .witcher-menu:hover{
                background-image: url(witchergif.webp)
            }
            .kingdome-menu:hover{
                background-image: url(kinggif.webp)
            }
            
            .nailedit-menu:hover{
                background-image: url(%ED%8C%8C%ED%8B%B0.webp)
            }
            .main img{

                overflow: hidden
            }
            
            .main:hover .name{
                background-color: white;
                color: black; 

                transition-duration: 0.7s;
            }
            .button1{
                background-color: #131024;
                border: none;
                color:#E50914;
                padding: 15px 0;
                text-align: center;
                text-decoration: none;
                display: inline-block;
                font-size: 30px;
                margin: 4px;
                cursor: pointer;
                border-radius:10px;
            }
            .button1:hover{
                background-color: #E50914;
                color:black;
            }

            .youtube{
                display: none;
                z-index: 20;
                position: absolute;
                left:790px

            }

            .main:hover .youtube{
                display: block
            }
            .footer-text  li{
                font-size: 10px;
                color: gainsboro;
                font-weight: 100;
                display: block;
                float: left;
            }
            .maker{
                position: absolute;
                bottom: 10px;
                left: 10px;
                color: gainsboro;
                font-weight: 100;
                font-size: 10px;
            }
            .trigger{
                position: absolute;
                left:225px;
                top:80px;
                color: #E50914;
            }
            .popup{
                position: absolute;
                top: 135px;
                left: 432px;
                z-index: -1;
                width: 336px;
                height: 180px;
                color: white;
            }

            .main:hover .popup{
                position: absolute;
                left: 80px;
                background-color: #E50914;
                transition-duration: 0.7s;
            }
            .popup-witcher{
                position: absolute;
                top: 390px;
            }

            .popup-santa{
                position: absolute;
                top: 645px;
            }


            .popup-you{
                position: absolute;
                top: 900px;
            }


            .popup-poli{
                position: absolute;
                top: 1155px;
            }

            .popup-nailedit{
                position: absolute;
                top: 1410px;
            }




        </style>
    </head>

    <body>
        <div class="menu-bar">
            <img src="" alt="">
            <ul>
                <li><a href="https://www.netflix.com/kr/"><input type="button" value="NETFLIX" class="button1"></a></li>

                <li class="kingdome-menu menu">
                    <a href="https://www.netflix.com/kr/title/80180171"> 킹덤 </a></li>

                <li class="witcher-menu menu"><a href="https://www.netflix.com/kr/title/80189685">위쳐</a></li>

                <li class="santa-menu menu"><a href="https://www.netflix.com/kr/title/80095815">산타클라라 다이어트</a></li>

                <li class="you-menu menu"><a href="https://www.netflix.com/kr/title/80211991">너의 모든것</a></li>

                <li class="poli-menu menu"><a href="https://www.netflix.com/kr/title/80241248">더 폴리티션</a></li>

                <li class="nailedit-menu menu"><a href="https://www.netflix.com/kr/title/80179138">파티셰를
                    잡아라</a></li>
            </ul>
            <div class =maker>KH / 2020-04-08 / 감사합니다.</div>

            <div class="trigger">▶</div>
        </div>

        <div class="wrapper">

            <div class="header">
                <div class="text1">넷플릭스 뭐 보지?<br></div>
                <div class="text2">뭐부터 봐야 할지 모르겠는 당신을 위한 추천작!</div><br>
            </div>

            <div class="contents">

                <div class="main kingdom">
                    <div class= "youtube youtube-kingdom">
                        <iframe width="560" height="315" src="https://www.youtube.com/embed/x-YJTJsVQ_0?controls=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
                    </div>
                    <img src="%ED%82%B9%EB%8D%A4.webp" alt="">
                    <div class="name">킹덤
                    </div>
                    <div class="popup"><br>병든 왕을 둘러싸고 흉흉한 소문이 떠돈다. 어둠에 뒤덮인 조선, 기이한 역병에 신음하는 산하. 정체 모를 악에 맞서 백성을 구원할 희망은 오직 세자뿐이다.</div>
                </div>


                <div><br></div>
                <div class="main witcher">
                    <div class= "youtube">
                        <iframe width="560" height="315" src="https://www.youtube.com/embed/bjSnsUFPxLI?controls=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
                    </div>
                    <img src="%EC%9C%84%EC%B3%902.webp" alt="">
                    <div class="name">위쳐</div>
                    <div class="popup popup-witcher"> 세계적인 판타지 대작이 넷플릭스 시리즈로 다시 태어난다. 어둠과 위험의 세계, 진실은 어디에 있을까. 운명으로 묶인 그들. 위쳐와 마법사, 홀로 남은 공주의 싸움이 시작된다.</div>
                </div>

                <div><br></div>
                <div class="main santa">
                    <div class= "youtube">
                        <iframe width="560" height="315" src="https://www.youtube.com/embed/R1Ib_OLPyRM?controls=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
                    </div>
                    <img src="%EC%82%B0%ED%83%80%ED%81%B4%EB%9D%BC%EB%9D%BC%EB%8B%A4%EC%9D%B4%EC%96%B4%ED%8A%B8.webp" alt="">
                    <div class="name">산타클라라 다이어트</div>
                    <div class="popup popup-santa">부동산 중개업에 종사하는 평범한 부부. 어느 날부터 아내에게 극적인 변화가 일어나고, 평범했던 두 사람에게 이제 죽음과 파멸이 가득한 '즐거운' 나날이 펼쳐진다.</div>
                </div>

                <div><br></div>
                <div class="main you">
                    <div class="youtube">
                        <iframe width="560" height="315" src="https://www.youtube.com/embed/RTmzZ5ipCq4?controls=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
                    </div>
                    <img src="%EB%84%88%EC%9D%982.webp" alt="">
                    <div class="name">너의 모든것</div>
                    <div class="popup popup-you">
                        마음이 끌리는 사람에게 다가가기 위해서라면, 무슨 짓이든 할 수 있다. 위험한 매력의 소유자, 집착의 끝을 보여주는 남자. 그의 소름 끼치는 로맨스가 시작된다.
                    </div>
                </div>

                <div><br></div>
                <div class="main politician">
                    <div class="youtube">
                        <iframe width="560" height="315" src="https://www.youtube.com/embed/zSj4Xm4raTg?controls=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
                    </div>
                    <img src="%EB%8D%94%20%ED%8F%B4%EB%A6%AC%ED%8B%B0%EC%85%98.webp" alt="">
                    <div class="name">더 폴리티션</div>
                    <div class="popup popup-poli">남부러울 것 없이 부유한 소년, 미래에 대통령이 되리라 믿어 의심치 않는 페이튼. 탄탄대로의 정치 인생을 위해, 거쳐야 할 험난한 과정이 있다. 고등학교 학생회장 선거!</div>
                </div>

                <div><br></div>
                <div class="main nailedit">
                    <div class="youtube">
                        <iframe width="560" height="315" src="https://www.youtube.com/embed/93hgjnR31fg?controls=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
                    </div>
                    <img src="%ED%8C%8C%ED%8B%B03.webp" alt="">
                    <div class="name">파티셰를 잡아라!</div>
                    <div class="popup popup-nailedit">과거는 잊어주세요. 엉망진창 경력을 뒤로하고, 아마추어 제빵사들이 도전을 시작한다. 임무는 ‘걸작’을 구워라, 상금은 1만 달러! 근데 이 난장판, 리얼리티 쇼가 맞나?</div>
                </div>
            </div>
            <br>
            <br>
            <br>

            <div class="footer">
                <div class="footer-text">

                </div>
            </div>


        </div>

    </body>
</html>

 

'디지털 컨버전스 > HTML&CSS' 카테고리의 다른 글

[화면 구현]  (0) 2020.05.11
[UI 구현]  (0) 2020.05.01
[CSS] animated css  (0) 2020.04.07
[CSS] 예제 - 팝업 리스트 만들기  (0) 2020.04.07
[CSS] hover  (0) 2020.04.07

animated css

https://daneden.github.io/animate.css/

 

Animate.css

 

daneden.github.io

 

Download Animate.css or View on GitHub

 

CDN : 컨텐트 딜리버리 네트워크

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
      <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css">
    <style>
        body{margin: auto; padding: 0px;}
        .box{
            border: 1px solid black;
            width: 100px;
            height: 100px;
            position: relative;
            top: 100px;
            left: 100px;
        }
    </style>
</head>
<body>
    <div class="box animated infinite bounce delay-0.5s"></div>
</body>
</html>

'디지털 컨버전스 > HTML&CSS' 카테고리의 다른 글

[UI 구현]  (0) 2020.05.01
[CSS] 과제 - 비반응형 웹페이지  (0) 2020.04.08
[CSS] 예제 - 팝업 리스트 만들기  (0) 2020.04.07
[CSS] hover  (0) 2020.04.07
[CSS] 예제 - 사이드바 트리거  (0) 2020.04.07
더보기
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <style>
            *{
                box-sizing: border-box;
                margin: auto;
                text-align: center;
                padding: 0px;
                z-index: 1;
            }
            body{
                margin: 0;
                padding: 0;

            }
            .wrapper{
                width: 1000px;
                height: 600px;
            }
            .sidemenu{
                width: 200px;
                height: 200px;
                position: fixed;
                top: 300px;
                left: -180px;
                z-index: 1;
            }
            .sidemenu:hover{
                position: fixed;
                top: 300px;
                left: 0px;
                transition-duration: 0.5s;

            }
            .topmenu{
                width: 100px;
                height: 100px;
                position: fixed;
                top: -200px;
                right: 50px;
                z-index: 1;
            }
            .topmenu:hover{
                position: fixed;
                top: 0px;
                right: 50px;
                transition-duration: 0.5s;

            }
            .menu>li{
                list-style: none;
                background-color: black;
                line-height: 50px;
                
            }
            li>a{
                color: white;
                text-decoration: none;
            }
            
            .navi{
                position: fixed;
                width: 100%;
                position:absolute;
                opacity: 0.6;
            }
            .navi>li{
                float:left;
                list-style: none;
                width:25%;
                text-align: center;
                background-color: black;
                line-height: 28px;
                /*                px 말고 %로는?*/
            }
            .navi>li>a{
                color: white;
                text-decoration: none;
                /*width: 100%;*/ 
                /*인라인 속성이라 넓이 조절 불가*/
                display: block;

            }
            .menu-item:hover{
                background-color: dimgray;
                font-weight: bold;
      
            }
        
         
            .menu{
                float: left;
                width: 150px;
            }
            .arrow{
                line-height: 200px;
                text-align: center;
                background-color: black;
                color: white; 
                width: 100%;
                height: 100%;
            }


            .header{height: 15%;}
            .naviline{height: 5%;}
            .navi{
                height: 100%;


            }
            .contents{height: 70%;}

            .footer{
                height: 10%; 
                border-bottom: 1px solid black;
                border-top: 1px solid black;
            }
            .left{
                width: 70%;
            }
            .right{
                width: 30%;
            }
            .header>.layout{
                height: 100%;
                float: left;
            }
            .logo{width: 15%;}
            .title{
                width: 70%;
                line-height: 90px;
            }
            .reserve{width: 15%;}
            .contents>.layout{
                height: 100%;
                float: left;
            }

            .idpw{
                float: left;
                height: 100%;
                width:65%;
            }
            .idpw>.idbox{
                height: 50%;
            }
            .idpw>.pwbox{
                height: 50%;
            }

            .id{
                width:100%;
                height: 100%;
                font-size: 100%;
                border: none;
                border-bottom: 1px solid black;
            }
            .pw{
                width:100%;
                height: 100%;
                font-size: 100%;
                border: none;
                border-bottom: 1px solid black;
            }
            .login{
                float: left;
                width:35%;
                height: 100%;
                padding: 8px 8px;
            }
            .button{
                border: 1px solid black;
                background-color: white;
                color: black;
                border-radius: 5px;
                padding: 8px 15px;
                font-size: 15px;       
            }
            .loginbox{
                width: 100%;
                height: 50px;
            }
            .banner{
                padding: 150px
            }
            .dropdown{

            }

            .dropdown-menu{
                display: none;

            }
            .portfolio:hover .dropdown-menu{
                display: block;
                background-color: black;
            }
        </style>
    </head>
    <body>
        <div class="naviline">
            <ul class="navi">
                <li class="menu-item"><a href="#">Home</a></li>
                <li class="menu-item"><a href="#">AboutUs</a></li>

                <li class="menu-item portfolio"><a href="#">

                    <div class="dropdown">
                        Portfolio
                        <ul class="dropdown-menu">
                            <li class="menu-item"><a href="#">Web</a></li>
                            <li class="menu-item"><a href="#">Native</a></li>
                            <li class="menu-item"><a href="#">Moblie</a></li>
                            <li class="menu-item"><a href="#">Security</a></li>
                        </ul>

                    </div>

                    </a></li>
                <li class="menu-item"><a href="#">Contact</a></li>
            </ul>
        </div>
        <div class="wrapper">
            <div class="header">
                <div class="logo layout">Logo</div>
                <div class="title layout">
                    <img src="car2.jpg" width=100%  height=100%>
                </div>
                <div class="reserve layout">Reserved</div>
            </div>

            <div class="contents">
                <div class="left layout">Left</div>
                <div class="right layout">
                    <div class="loginbox">

                        <div class="idpw">
                            <div class="idbox">
                                <input type="text" class="id" placeholder="ID를 입력하세요">
                            </div>
                            <div class="pwbox">
                                <input type="password" class="pw" placeholder="PW를 입력하세요">
                            </div>
                        </div>

                        <div class="login">
                            <input type="button" value="Login" class="button">
                        </div>

                    </div>
                    <div class="banner">
                        banner
                    </div>
                </div>
            </div>
            <div class="footer">Footer
            </div>    
        </div>

        <div class="sidemenu">
            <ul class="menu">
                <li class="menu-item"><a href="#">Home</a></li>
                <li class="menu-item"><a href="#">AboutUs</a></li>
                <li class="menu-item"><a href="#">Portfolio</a></li>
                <li class="menu-item"><a href="#">Contact</a></li>

            </ul>

            <div class="arrow"> ▷</div>
        </div>

        <div class="topmenu">
            <ul class="menu">
                <li class="menu-item"><a href="#">Home</a></li>
                <li class="menu-item"><a href="#">AboutUs</a></li>
                <li class="menu-item"><a href="#">Portfolio</a></li>
                <li class="menu-item"><a href="#">Contact</a></li>
                <li class="arrow"><a href="#">▽</a></li>
            </ul>

        </div>

    </body>
</html>

 

position:absolute; 적용 위치

코드 지저분


강사님코드

더보기
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <style>

            Result
            Source map
            Restructure
            Beautify
            * {
                box-sizing: border-box;
                text-align: center;
                font-size: 20px
            }

            body {
                padding: 0;
                margin: 0
            }

            .wrapper {
                width: 1000px;
                height: 600px;
                margin: auto;
                position: relative;
                top: 100px
            }

            .header {
                height: 15%
            }

            .logo {
                width: 15%
            }

            .title {
                width: 70%
            }

            .reserved {
                width: 15%
            }

            .navi {
                height: 5%
            }

            .contents,.footer {
                height: 70%;
                border-bottom: 1px solid #000
            }

            .footer {
                height: 800px
            }

            .left {
                width: 70%
            }

            .right {
                width: 30%
            }

            #input-area,.hlayout,.navi-bar>li {
                float: left;
                height: 100%
            }

            .navi-bar {
                padding: 0;
                margin: 0;
                width: 100%;
                position: fixed;
                top: 0;
                left: 0;
                opacity: .5
            }

            .navi-bar>li {
                position: relative;
                list-style-type: none;
                text-align: center;
                width: 25%;
                background-color: #000;
                overflow: hidden
            }

            .navi-bar>li:hover .pop-menu {
                opacity: 1;
                display: block
            }

            .navi-bar>li>a {
                color: gray;
                text-decoration: none;
                display: block;
                width: 100%;
                height: 100%
            }

            .navi-bar>li:hover {
                background-color: #696969;
                overflow: visible
            }

            .navi-bar>li:hover>a {
                color: #fff
            }

            .login-area {
                width: 100%;
                height: 20%
            }

            #input-area {
                width: 70%
            }

            #input-area input::placeholder {
                color: gray
            }

            #input-area input {
                color: #000;
                box-sizing: border-box;
                border: 0;
                width: 100%;
                height: 100%;
                border-bottom: 1px dotted #000
            }

            #input-area #div-id,#input-area #div-pw {
                width: 100%;
                height: 50%
            }

            #button-area {
                width: 30%;
                height: 100%;
                float: left;
                padding-top: 12px
            }

            #button-area button {
                width: 80%;
                height: 80%;
                background-color: #fff;
                color: #000;
                border-radius: 5px;
                border: 1px solid #000;
                transition-duration: .2s
            }

            #button-area button:hover {
                cursor: pointer;
                background-color: #000;
                color: #fff
            }

            .banner-area {
                height: 80%;
                padding-top: 120px
            }

            .side-menu {
                border: 1px solid #000;
                width: 180px;
                height: 200px;
                position: absolute;
                top: 150px;
                left: 0;
                transform: translate(-90%);
                transition-duration: 1s
            }

            .side-menu>.trigger {
                position: absolute;
                z-index: 5;
                color: #fff;
                top: 50%;
                left: 90%;
                transform: translateY(-50%)
            }

            .side-menu:hover {
                transform: translate(0)
            }

            .menu-item {
                height: 25%;
                line-height: 45px;
                background-color: #000;
                color: gray;
                cursor: pointer
            }

            .menu-item:hover {
                background-color: #696969;
                color: #fff
            }

            .top-menu {
                width: 200px;
                position: absolute;
                right: 50px;
                transform: translateY(-85%);
                transition-duration: 1s
            }

            .top-menu:hover {
                transform: translateY(0);
                z-index: 10
            }

            .pop-menu {
                position: absolute;
                width: 100%;
                opacity: 0;
                transition-duration: 1.5s
            }
        </style>
    </head>
    <body>
        <div class="side-menu">
            <div class="menu-item">Home</div>
            <div class="menu-item">About Us</div>
            <div class="menu-item">Portfolio</div>
            <div class="menu-item">Contact</div>
            <div class="trigger">▷</div>
        </div>

        <div class="wrapper">
            <div class="header">
                <div class="logo hlayout">Logo</div>
                <div class="title hlayout">
                    <img src="title.png">
                </div>
                <div class="reserved hlayout">Reserved</div>
            </div>
            <div class="navi">
                <ul class="navi-bar">
                    <li><a href="#">Home</a></li>
                    <li><a href="#">AboutUs</a></li>
                    <li><a href="#">Portfolio</a>
                        <div class="pop-menu">
                            <div class="menu-item">Web</div>
                            <div class="menu-item">Native</div>
                            <div class="menu-item">Mobile</div>
                            <div class="menu-item">Security</div>
                        </div>
                    </li>
                    <li><a href="#">Contact</a></li>
                </ul>
            </div>
            <div class="contents">
                <div class="left hlayout">Left</div>
                <div class="right hlayout">
                    <div class="login-area">
                        <div id=input-area>
                            <div id=div-id>
                                <input type=text placeholder="ID를 입력하세요.">
                            </div>
                            <div id=div-pw>
                                <input type=password placeholder="PW를 입력하세요.">
                            </div>
                        </div>
                        <div id=button-area>
                            <button>Login</button>
                        </div>
                    </div>
                    <div class="banner-area">
                        Banner
                    </div>
                </div>
            </div>
            <div class="footer">footer</div>
        </div>
    </body>
</html>

'디지털 컨버전스 > HTML&CSS' 카테고리의 다른 글

[CSS] 과제 - 비반응형 웹페이지  (0) 2020.04.08
[CSS] animated css  (0) 2020.04.07
[CSS] hover  (0) 2020.04.07
[CSS] 예제 - 사이드바 트리거  (0) 2020.04.07
[CSS] 예제 (z-index , transform) - 위로 오는 사진  (0) 2020.04.07

 

안쪽의 요소를 제어하는 것 가능

 .wrapper:hover>.box{}

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        *{box-sizing: border-box;}
        div{border: 1px solid black;}
        .wrapper{
            width: 300px;
            height: 300px;
        }
        .wrapper:hover>.box{
            background-color: pink;
        }
        .box{
            width: 100px;
            height: 100px;
            position: relative;
            top: 100px;
            left: 100px;
        }
    </style>
</head>
<body>
    <div class="wrapper">
        <div class="box"></div>
    </div>
</body>
</html>

Wrapper에 마우스를 올리면 box가 변경된다.


안보이게 만들기

스타일시트에서는 요소를 삭제할수는 없음 (자바스크립트에서는 가능)

 

1) 없는 것처럼 만들기 : 기능도 사라짐

        .wrapper:hover>.box{
            display: none;
        }

 

2) 투명하게 만들기 : : hover등 기능하도록 할수 있음

        .wrapper:hover>.box{
            opacity: 0;
        }

 

더보기

이전 코드

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <style>
            *{
                box-sizing: border-box;
                margin: auto;
                text-align: center;
                padding: 0px;
            }
            .wrapper{
                width: 1000px;
                height: 600px;
            }
            .sidemenu{
                width: 200px;
                height: 200px;
                position: fixed;
                top: 300px;
                left: -150px;
                z-index: 1;
            }
            .sidemenu:hover{
                position: fixed;
                top: 300px;
                left: 0px;
                transition-duration: 0.5s;
               

            }
            .smenu>li{
                list-style: none;
                background-color: black;
                line-height: 50px;
            }
            .smenu>li>a{
                color: white;
                text-decoration: none;
            }
            .smenu>li:hover{
                background-color: dimgray;
                font-weight: bold;
            }
            .smenu{
                float: left;
                width: 90%;
            }
            .arrow{
                height: 200px;
                line-height: 200px;
                text-align: center;
                background-color: black;
                color: red;
            }

            .header{height: 15%;}
            .naviline{height: 5%;}
            .navi{
                height: 100%;
            }
            .contents{height: 70%;}

            .footer{
                height: 10%; 
                border-bottom: 1px solid black;
                border-top: 1px solid black;
            }
            .left{
                width: 70%;
            }
            .right{
                width: 30%;
            }
            .header>.layout{
                height: 100%;
                float: left;
            }
            .logo{width: 15%;}
            .title{
                width: 70%;
                line-height: 90px;
            }
            .reserve{width: 15%;}
            .contents>.layout{
                height: 100%;
                float: left;
            }
            .navi>li{
                float:left;
                list-style: none;
                width:25%;
                text-align: center;
                background-color: black;
                line-height: 28px;
                /*                px 말고 %로는?*/
            }
            .navi>li>a{
                color: white;
                text-decoration: none;
                /*width: 100%;*/ 
                /*인라인 속성이라 넓이 조절 불가*/
                display: block;

            }
            .navi>li:hover{
                background-color: dimgray;
                font-weight: bold;
            }
            .idpw{
                float: left;
                height: 100%;
                width:65%;
            }
            .idpw>.idbox{
                height: 50%;
            }
            .idpw>.pwbox{
                height: 50%;
            }

            .id{
                width:100%;
                height: 100%;
                font-size: 100%;
                border: none;
                border-bottom: 1px solid black;
            }
            .pw{
                width:100%;
                height: 100%;
                font-size: 100%;
                border: none;
                border-bottom: 1px solid black;
            }
            .login{
                float: left;
                width:35%;
                height: 100%;
                padding: 8px 8px;
            }
            .button{
                border: 1px solid black;
                background-color: white;
                color: black;
                border-radius: 5px;
                padding: 8px 15px;
                font-size: 15px;       
            }
            .loginbox{
                width: 100%;
                height: 50px;
            }
            .banner{
                padding: 150px
            }
        </style>
    </head>
    <body>

        <div class="wrapper">
            <div class="header">
                <div class="logo layout">Logo</div>
                <div class="title layout">
                    <img src="car2.jpg" width=100%  height=100%>
                </div>
                <div class="reserve layout">Reserved</div>
            </div>
            <div class="naviline">
                <ul class="navi">
                    <li><a href="#">Home</a></li>
                    <li><a href="#">AboutUs</a></li>
                    <li><a href="#">Portfolio</a></li>
                    <li><a href="#">Contact</a></li>
                </ul>
            </div>
            <div class="contents">
                <div class="left layout">Left</div>
                <div class="right layout">
                    <div class="loginbox">

                        <div class="idpw">
                            <div class="idbox">
                                <input type="text" class="id" placeholder="ID를 입력하세요">
                            </div>
                            <div class="pwbox">
                                <input type="password" class="pw" placeholder="PW를 입력하세요">
                            </div>
                        </div>

                        <div class="login">
                            <input type="button" value="Login" class="button">
                        </div>

                    </div>
                    <div class="banner">
                        banner
                    </div>
                </div>
            </div>
            <div class="footer">Footer
            </div>    
        </div>

        <div class="sidemenu">

            <ul class="smenu">
                <li><a href="#">Home</a></li>
                <li><a href="#">AboutUs</a></li>
                <li><a href="#">Portfolio</a></li>
                <li><a href="#">Contact</a></li>
                
            </ul>
            
            <div class="arrow">▷</div>
            
        </div>
        
        
    </body>
</html>

화살표 부분을 별도로 구성하는 방식?

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <style>
            *{
                box-sizing: border-box;
                margin: auto;
                text-align: center;
                padding: 0px;
            }
            .wrapper{
                width: 1000px;
                height: 600px;
            }
            .sidemenu{
                width: 200px;
                height: 200px;
                position: fixed;
                top: 300px;
                left: -180px;
                z-index: 1;
            }
            .sidemenu:hover{
                position: fixed;
                top: 300px;
                left: 0px;
                transition-duration: 0.5s;
               
            }
            .topmenu{
                width: 200px;
                height: 200px;
                position: fixed;
                top: -200px;
                right: 0px;
                z-index: 1;
            }
            .topmenu:hover{
                position: fixed;
                top: 0px;
                right: 0px;
                transition-duration: 0.5s;

            }
            .smenu>li{
                list-style: none;
                background-color: black;
                line-height: 50px;
            }
            .smenu>li>a{
                color: white;
                text-decoration: none;
            }
            .smenu>li:hover{
                background-color: dimgray;
                font-weight: bold;
            }
            .smenu{
                float: left;
                width: 150px;
            }
            .arrow{
                line-height: 200px;
                text-align: center;
                background-color: black;
                color: white; 
                width: 100%;
                height: 100%;
            }
            
          
            .header{height: 15%;}
            .naviline{height: 5%;}
            .navi{
                height: 100%;
            }
            .contents{height: 70%;}

            .footer{
                height: 10%; 
                border-bottom: 1px solid black;
                border-top: 1px solid black;
            }
            .left{
                width: 70%;
            }
            .right{
                width: 30%;
            }
            .header>.layout{
                height: 100%;
                float: left;
            }
            .logo{width: 15%;}
            .title{
                width: 70%;
                line-height: 90px;
            }
            .reserve{width: 15%;}
            .contents>.layout{
                height: 100%;
                float: left;
            }
            .navi>li{
                float:left;
                list-style: none;
                width:25%;
                text-align: center;
                background-color: black;
                line-height: 28px;
                /*                px 말고 %로는?*/
            }
            .navi>li>a{
                color: white;
                text-decoration: none;
                /*width: 100%;*/ 
                /*인라인 속성이라 넓이 조절 불가*/
                display: block;

            }
            .navi>li:hover{
                background-color: dimgray;
                font-weight: bold;
            }
            .idpw{
                float: left;
                height: 100%;
                width:65%;
            }
            .idpw>.idbox{
                height: 50%;
            }
            .idpw>.pwbox{
                height: 50%;
            }

            .id{
                width:100%;
                height: 100%;
                font-size: 100%;
                border: none;
                border-bottom: 1px solid black;
            }
            .pw{
                width:100%;
                height: 100%;
                font-size: 100%;
                border: none;
                border-bottom: 1px solid black;
            }
            .login{
                float: left;
                width:35%;
                height: 100%;
                padding: 8px 8px;
            }
            .button{
                border: 1px solid black;
                background-color: white;
                color: black;
                border-radius: 5px;
                padding: 8px 15px;
                font-size: 15px;       
            }
            .loginbox{
                width: 100%;
                height: 50px;
            }
            .banner{
                padding: 150px
            }
        </style>
    </head>
    <body>

        <div class="wrapper">
            <div class="header">
                <div class="logo layout">Logo</div>
                <div class="title layout">
                    <img src="car2.jpg" width=100%  height=100%>
                </div>
                <div class="reserve layout">Reserved</div>
            </div>
            <div class="naviline">
                <ul class="navi">
                    <li><a href="#">Home</a></li>
                    <li><a href="#">AboutUs</a></li>
                    <li><a href="#">Portfolio</a></li>
                    <li><a href="#">Contact</a></li>
                </ul>
            </div>
            <div class="contents">
                <div class="left layout">Left</div>
                <div class="right layout">
                    <div class="loginbox">

                        <div class="idpw">
                            <div class="idbox">
                                <input type="text" class="id" placeholder="ID를 입력하세요">
                            </div>
                            <div class="pwbox">
                                <input type="password" class="pw" placeholder="PW를 입력하세요">
                            </div>
                        </div>

                        <div class="login">
                            <input type="button" value="Login" class="button">
                        </div>

                    </div>
                    <div class="banner">
                        banner
                    </div>
                </div>
            </div>
            <div class="footer">Footer
            </div>    
        </div>

        <div class="sidemenu">
            <ul class="smenu">
                <li class="menu-item"><a href="#">Home</a></li>
                <li class="menu-item"><a href="#">AboutUs</a></li>
                <li class="menu-item"><a href="#">Portfolio</a></li>
                <li class="menu-item"><a href="#">Contact</a></li>
       
            </ul>
            
            <div class="arrow"> ▷</div>
        </div>
        
        <div class="topmenu">
            <ul class="smenu">
                <li class="menu-item"><a href="#">Home</a></li>
                <li class="menu-item"><a href="#">AboutUs</a></li>
                <li class="menu-item"><a href="#">Portfolio</a></li>
                <li class="menu-item"><a href="#">Contact</a></li>
                <li class="arrow"><a href="#">▽</a></li>
            </ul>
            
        </div>

    </body>
</html>

 

마우스를 올리면 사진이 위로 오면서 기울어지도록

 

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <style>

            *{box-sizing: border-box;}
            div{border: 1px solid black;}
            .wrapper{
                margin: auto;
                position: relative;
            }
            .box{                
                width:300px;
                height: 200px;
                position: absolute;
                padding: 5px;
                background-color: white;
            }
            .box1{
                top: 270px;
                left: 350px;
            }
            .box2{

                top: 150px;
                left: 200px;
                z-index: 1;
            }
            .box3{
                top: 100px;
                left: 400px;
                z-index: 2;
            }
            .box:hover{
                z-index: 3;
                transform: scale(1.1,1.1) rotate(10deg);
            }
            
            .cat{
                width:100%;
                height: 100%;
                border: 1px solid black;
            }
            .txt{
                background-color: white;
                text-align: center;
                font-size: 20px;
                font-weight: bold;
            }
        </style>
    </head>
    <body>
        <div class="wrapper">
            <div class="box box1">
                <img src="cat1.jpg" class="cat cat1">
            </div>
            <div class="box box2">
                <img src="cat2.jpg" class="cat cat2">
            </div>
            <div class="box box3">
                <img src="cat3.jpg" class="cat cat3">
            </div>
        </div>
    </body>
</html>

 

수직정렬

1) line-height : 텍스트이며 1줄인경우

2) transform: translate(50%, 50px) : transform이 적용되는 Element의 크기 기준 %

 

부모 요소 사이즈가 변해도 정렬이 되도록

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <style>
            *{box-sizing: border-box;}
            div{border: 1px solid black;}
            .wrapper{
                width: 300px; 
                height: 300px; 
                line-height: 300px;
                position: relative
                
            }
            .box{
                width: 100px;
                height: 100px;
                position: absolute;
                top: 50%;
                left:50%;
            }
        </style>

    </head>
    <body>
        <div class="wrapper">
            <div class="box"></div>
        </div>
    </body>
</html>

왼쪽 위 모서리 기준으로 중앙으로 이동

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <style>
            *{box-sizing: border-box;}
            div{border: 1px solid black;}
            .wrapper{
                width: 300px; 
                height: 300px; 
                line-height: 300px;
                position: relative
                
            }
            .box{
                width: 100px;
                height: 100px;
                position: absolute;
                top: 50%;
                left:50%;
                transform: translate(-50%,-50%)
            }
        </style>

    </head>
    <body>
        <div class="wrapper">
            <div class="box"></div>
        </div>
    </body>
</html>

transform:translate(-50%,-50%) 자체 사이즈 만큼 이동

 

Transform

Element에 동적인 변화효과를 부여함

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .box{
            border: 1px solid black;
            width: 100px;
            height: 100px;
            transition-duration: 2s;
            line-height: 100px;
            text-align: center;
        }
        .box1:hover{
            transform: translate(50%, 50px);
        }
        .box2:hover{
            transform: rotate(-720deg);
            border-radius: 50px;
        }
        .box3:hover{
            transform: scale(0.5,5);
        }
        .box4:hover{
/*            transform: rotateX(90deg);*/
            transform: rotateY(90deg);
        }
    </style>
</head>
<body>
    <div class="box box1">Text</div>
    <div class="box box2">Text</div>
    <div class="box box3">Text</div>
    <div class="box box4">Text</div>
</body>
</html>

수직정렬

1) line-height : 텍스트가 1줄인경우

2) transform: translate(50%, 50px) : transform이 적용되는 Element의 크기 기준 %

+ Recent posts