728x90
반응형
728x90
반응형
<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
        #box1{
            background-color: darkcyan;    
            float: left;
        }
        #box2{
            background-color: darkgreen;
            float: left;
        }
        #box3{
            background-color: dodgerblue;
            float: left;    
        }
        #box4{
            background-color: darkslateblue;
            clear: left;    
        }
    </style>
</head>
<body>
    <div id="box1">박스1</div>
    <div id="box2">박스2</div>
    <div id="box3">박스3</div>
    <div id="box4">박스4</div>
</body>
</html>
728x90
반응형

'코딩일지 > WEB' 카테고리의 다른 글

Position예제  (0) 2022.12.28
float예제2  (0) 2022.12.28
3단 레이아웃  (0) 2022.12.28
display속성과 margin  (0) 2022.12.28
표 스타일2  (0) 2022.12.28
728x90
반응형
<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <title>3단 레이아웃</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;    
        }

        #container {
            width: 1200px;
            margin: 20px auto;
        }
        #header {
            width: 100%; /* 부모 요소를 기준으로 해서 비율(%)*/
            background-color: darkcyan;
        }
        #left_sidebar{
            background-color: cornflowerblue;
            width: 200px;
            height: 150px;
            float: left;
        }
        #contents{
            width: 800px;
            height: 150px;
            background-color: rgb(223, 224, 226);
            float: left;    
        }
        #rightt_sidebar{
            background-color: cornflowerblue;
            width: 200px;
            height: 150px;
            float: left;
        }
        #footer{
            width: 100%;
            height: 100px;
            background-color: darkcyan;
            clear: left;
        }

    </style>
</head>
<body>                                                                                              
        <header id="header">
            <h1>사이트 제목</h1>
        </header>
        <aside id="left_sidebar">
            <h2>사이드바</h2>
        </aside>
        <section id="contents">
            <h2>본문</h2>
        </section>
        <aside id="right_sidebar">
            <h2>사이드바</h2>
        </aside>
        <footer id="footer">
            <h2>웹페이지 정보</h2>
        </footer>
    </div>
</body>
</html>
728x90
반응형

'코딩일지 > WEB' 카테고리의 다른 글

float예제2  (0) 2022.12.28
float예제1  (0) 2022.12.28
display속성과 margin  (0) 2022.12.28
표 스타일2  (0) 2022.12.28
표 스타일  (0) 2022.12.28
728x90
반응형
<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .button {
            /* height: 마진값으로 알아서 크기를 조정하도록 하는 것이 좋다.
            사용자가 명시적으로 할 떄는 꼭 해야될 때만 */
            /* display :none > 보이지도 않고 자리 차지도 하지 않음
            block: 부모 요소의 가로 크기 전부를 전부 차지함(한줄 전부) 
            inline: 줄을 다 차지하지 않고 필요ㅕ한 만큼만 공잔 차지  *width, height, margin, padding 값 등이 무시된다.
            inline-block : 줄을 다차지하지 않으면서 크기 조정 가능*/
            
            display: inline-block;
            width: 10rem;
            background-color: darkseagreen;
            border-radius: 20%;
            padding: 0.5rem;
            margin: 0.0825rem;
            text-align: center;
        }
    </style>
</head>
<body>
    <div class="button">로그인</div>
    <div class="button">회원가입</div>
</body>
</html>
728x90
반응형

'코딩일지 > WEB' 카테고리의 다른 글

float예제1  (0) 2022.12.28
3단 레이아웃  (0) 2022.12.28
표 스타일2  (0) 2022.12.28
표 스타일  (0) 2022.12.28
font연습2  (0) 2022.12.28
728x90
반응형
<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        caption {
            color: green;
            font-weight: bold;
        }
        table {
            text-align: center;
            width: 400px;
            border-spacing: 0.2;
        }
        tr, td{
            border: 1px solid black;
        }

        thead, tfoot {
            background-color: rgb(214, 214, 214);
            font-weight: bold;
        }

    </style>
</head>
<body>
    <table>
        <caption>요안도라 객실</caption>

        <thead>
            <tr>
                <td>방이름</td>
                <td>대상</td>
                <td>크기</td>
                <td>가격</td>
            </tr>
        </thead>

        <tbody>
            <tr>
                <td>유채방</td>
                <td>여성 도미토리</td>
                <td rowspan="3">4인실</td>
                <td rowspan="4">1인 20,000원</td>
            </tr>
            <tr>
                <td rowspan="2">동백방</td>
                <td>동성 도미토리</td>
            </tr>
            <tr>
                <td>가족 1팀</td>
            </tr>
            <tr>
                <td>천혜향방</td>
                <td>-</td>
                <td>2인실</td>
            </tr>
        </tbody>


        <tfoot>
            <tr>
                <td colspan="4">바깥채 전체를 렌트합니다.</td>
            </tr>

        </tfoot>
    </table>
</body>
</html>
728x90
반응형

'코딩일지 > WEB' 카테고리의 다른 글

3단 레이아웃  (0) 2022.12.28
display속성과 margin  (0) 2022.12.28
표 스타일  (0) 2022.12.28
font연습2  (0) 2022.12.28
font연습  (0) 2022.12.28
728x90
반응형
<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        table {
            caption-side: bottom;
            border: 1px solid black;
            border-collapse: collapse;
            text-align: center;
            border-spacing: 5px 5px;    
        }

        tr, td{
            border: 1px solid black;
        }
        .heading {
            background-color: rgb(214, 214, 214);
            font-weight: bold;
        }

    </style>
</head>
<body>
    <table>
        <caption>2019 국민 도서실태.</caption>
            <tr>
                <td class="heading">구분</td>
                <td class="heading">성인</td>
                <td class="heading">독서자</td>
            </tr>
            <tr>
                <td class="heading">종이책</td>
                <td>6.1권</td>
                <td>11.8권</td>
            </tr>
            <tr>
                <td class="heading">전자책</td>
                <td>1.2권</td>
                <td>7.1권</td>
            </tr>
            <tr>
                <td class="heading">오디오북</td>
                <td>0.2권</td>
                <td>5.5권</td>
            </tr>
         
    </table>
    
</body>
</html>
728x90
반응형

'코딩일지 > WEB' 카테고리의 다른 글

display속성과 margin  (0) 2022.12.28
표 스타일2  (0) 2022.12.28
font연습2  (0) 2022.12.28
font연습  (0) 2022.12.28
CSS형제선택자 연습  (0) 2022.12.28
728x90
반응형
<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        p > span {
            background-color: rgb(0, 0, 189);
            line-height: 2;
            font-size: 30px;
            color: white;
            font-weight: bold;
        }

        .a1 {
            color: red;
            font-weight: bold;

        }

        .a2 {
            font-weight: bold;
        }

        div > sup {
            font-style: italic;
        }


    </style>
</head>
<body>
    <fieldset>
        <p>
            <span>탐라국 입춘굿<span>            
        </p>
            
        <div>
            제주도의 문화축제 중에서 유일하게 <span class="a1">탐라 시대부터 내려온 축제</span>이다
        </div>
        </br>

        <div>
            제주에서 입춘은 <span class="a2">새철</span><sup>(제주어, 샛절)</sup> 드는 날이라 한다.
        </div>

        <div>
            하늘의 1만 8,000 신이 지상으로 내려와 새해 일들을 시작하는 때다.
        </div>
    </fieldset>
</body>
</html>
728x90
반응형

'코딩일지 > WEB' 카테고리의 다른 글

표 스타일2  (0) 2022.12.28
표 스타일  (0) 2022.12.28
font연습  (0) 2022.12.28
CSS형제선택자 연습  (0) 2022.12.28
CSS연습(자식선택자)  (0) 2022.12.28
728x90
반응형
<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <title>폰트연습</title>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Nanum+Brush+Script&display=swap');
        @font-face {
            font-family: '빙그레체';
            src: url(BinggraeSamanco.ttf);
        }
        
        .first {
            font-family: 'Nanum Brush Script', '빙그레체';
            font-size: 16px;
        }
        .second {
            font-family: 바탕;
            font-size: 1rem;    
            font-style: italic;
            font-weight: bold;
        }
        a {
            color: black;
            text-decoration: none;
        }
        p {
            text-align: center;
            background-color: blanchedalmond;
        }
        span{
            color: rgba(0, 0, 0 0.255);
            font-size: 60px;
            line-height: 2;
            text-shadow: 20px 20px 3px red;
            letter-spacing: 10px;
            text-align: center;  
            background-color: darkgoldenrod;  
        }
    </style>
</head>
<body>
    <p>
        <span>CSS3</span><br>
    </p>
    <a href="#">이동하기버튼</a>
    <p class="first">
        Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
    </p>
    <p class="second">
        It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
    </p>
</body>
</html>
728x90
반응형

'코딩일지 > WEB' 카테고리의 다른 글

표 스타일  (0) 2022.12.28
font연습2  (0) 2022.12.28
CSS형제선택자 연습  (0) 2022.12.28
CSS연습(자식선택자)  (0) 2022.12.28
CSS연습  (0) 2022.12.28
728x90
반응형
<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <title>형제 연습</title>
    <style>
        /* 현제 선택자: {선택자1} ~ {선택자2} : 선택자 1에 의해 선택된 요소 뒤에 붙어나오는 서택자2에 해당하는 요소를 선택한다. 떨어져 있어도 된다. 같은 부모 내에서! */
        ul > span ~ li {
            color: blue;
        }
        /* 인접형태 선택자: {선택자1} + {선택자2} 선택자1에 의해 선택된 요소 바로 뒤에 있는 선택자2를 선택한다. 떨어져 있으면 안되고, 해당하는 모든 형제를 선택을 한다. 같은 부모 내에서! */
        ul > li + li {
            color: greenyellow;
        }

        input[type='text']{
            width: 10px;
        }
        

    </style>
</head>
<body>
    <ul>
        <span>시작</span>
        <li>목록1</li>
        <a href="https://www.naver.com">링크</a>
        <input type="text" value="test">
        <input type="button" value="bt">
        <input type="radio" value="ra">
        <li>목록2</li>
        <span>변절자</span>
        <li>목록3</li>
        <li>목록4</li>
    </ul>
    <ul>
        <li>목록5</li>
        <li>목록6</li>
    </ul>
</body>
</html>
728x90
반응형

'코딩일지 > WEB' 카테고리의 다른 글

font연습2  (0) 2022.12.28
font연습  (0) 2022.12.28
CSS연습(자식선택자)  (0) 2022.12.28
CSS연습  (0) 2022.12.28
폰트연습  (1) 2022.12.25

+ Recent posts

728x90
반응형
">