๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

html, css

์ฝ”๋ˆ„๋‚˜๋‹˜ - HTML, CSS / Chapter 3 - CSS ์›น์‚ฌ์ดํŠธ ๊พธ๋ฏธ๊ธฐ

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            margin : 20px;
            padding : 50px;
            border : 50px solid red;
            width : 200px;
            font-family:'Times New Roman', Times, serif
        }
        .green {
            border : 50px solid green;
        }

        .blue {
            border : 50px solid blue;
        }
    </style>
</head>
<body>
    <div>
        <div class="box">Box 1</div>
        <div class="box green">Box 2</div>
        <div class="box blue">Box 3</div>
    </div>
</body>
</html>

 

 

์ด ๋•Œ ์—ฌ๊ธฐ์„œ box 2์—๊ฒŒ display : none, visibility : hidden์„ ๊ฐ๊ฐ ์ ์šฉํ•ด๋ณด๊ณ  ๋ฌด์Šจ ์ฐจ์ด์ ์ด ์žˆ๋А๋ƒ๊ณ  ํ•˜์…จ๋‹ค. 

๋”ฑ๋ด๋„ ๋Œ€์ถฉ ๊ฐ์ด ์˜ค์ง€๋งŒ... 

display : none์€ ๊ทธ๋ƒฅ ์–˜ ์ž์ฒด๋ฅผ ๋ฐฐ์น˜ํ•˜์ง€ ์•Š๊ฒ ๋‹ค์—ฌ์„œ Box3์ด Box2์˜ ๋นˆ์ž๋ฆฌ๋ฅผ ์ฑ„์šธ ๊ฒƒ์ด๊ณ ,

visibility : hidden์€ ๋ณด์—ฌ์ง€๋Š” ๊ฒƒ์„ ์ˆจ๊ธฐ๋Š” ๊ฒƒ์œผ๋กœ Box2๊ฐ€ ์‹ค์ œ ๋ฐฐ์น˜๋Š” ๋˜์–ด ์žˆ์ง€๋งŒ ์šฐ๋ฆฌ ๋ˆˆ์—๋Š” ์•ˆ๋ณด์ผ ๊ฒƒ์ด๋‹ค.

 

        .green {
            display : none;
            visibility : hidden;
            border : 50px solid green;
        }

 

์‹ค์ œ๋กœ ์ฐจ์ด๋ฅผ ํ™•์ธํ•ด ๋ณด๊ธฐ ์œ„ํ•ด ์ผ๋‹จ ์ฝ”๋“œ์—๋Š” ๋‘˜๋‹ค ์ž‘์„ฑํ•ด๋‘๊ณ  ๊ฐœ๋ฐœ์ž ๋„๊ตฌ๋ฅผ ์ด์šฉํ•ด ๋น„๊ตํ•ด๋ณด๋„๋ก ํ•˜์ž. 

 

์™ผ์ชฝ์€ display : none, ์˜ค๋ฅธ์ชฝ์€ visibility : hidden

 

๊ทธ๋ฆฌ๊ณ  ์ƒ‰๊น”์„ ๋ฐ”๊ฟ”๋ณด๊ธฐ๋„ ์žˆ์—ˆ๋Š”๋ฐ ๊ทธ๋ƒฅ blue๋‚˜ green์„ ์ปฌ๋Ÿฌ์ฝ”๋“œ๋กœ ๋ฐ”๊พธ๋ฉด ๋˜๋Š” ๊ฒƒ์ด๋ฏ€๋กœ ์ƒ๋žต.

 

 

 

 

๋‘๋ฒˆ์งธ ์—ฐ์Šตํ•˜๊ธฐ.

 

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            font-family:'Times New Roman', Times, serif;
        }

        html {
            background-color: #fff;
            background-image:
            linear-gradient(90deg, transparent 79px, #abced4 79px, #abced4 81px, transparent 81px),
            linear-gradient(#eee .1em, transparent .1em);
            background-size: 100% 1.2em;
        }

        body {
            padding : 0 10%;
        }
        
        h1 {
            color : #9b59b6;
        }

        h1::before {
            content : "Topic:"
        }

        h1:first-child{
            text-align: center;
        }

        p {
            font-size : 16px;
            font-family : Verdana;
            font-style : italic;
        }

        /* ์ฒซ ๊ธ€์ž ์„ ํƒ์€ ::first-letter, ์ฒซ ์ค„ ์„ ํƒ์€ ::first-line */
        p::first-letter {
            font-size : 200%;
            color : #2980b9;
        }

        .sub-header {
            color : #2980b9;
        }
    </style>
</head>
<body>
    <div class="challenge2"> 
        <h1>HTML Tutorial</h1> 
        <p class="sub-header">HTML is the standard markup language for Web pages. With HTML you can create your own Website. HTML is easy to learn - You will enjoy it! </p> 
        <p>The HyperText Markup Language, or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScript. ... HTML elements are the building blocks of HTML pages.  </p> 

        <h1>CSS Tutorial</h1> 
        <p class="sub-header">CSS is the language we use to style an HTML document.CSS describes how HTML elements should be displayed.This tutorial will teach you CSS from basic to advanced.</p> 
        <p>Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language such as HTML. CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript.  </p> 
      </div>
</body>
</html>

 

 

 

first-child๋‚˜ before์€ ๊ทธ๋ž˜๋„ ํ˜„์žฅ์‹ค์Šต ๋•Œ ๋งŽ์ด ์ด์šฉํ–ˆ์–ด์„œ ์•„์ง๋„ ๊ธฐ์–ต์— ์ข€ ๋‚จ๋Š”๋ฐ...

<p>ํƒœ๊ทธ์˜ ์ฒซ๋ฒˆ์งธ ๊ธ€์ž๋Š” ๊ทธ๋ƒฅ ๋ฌดํ„ฑ๋Œ€๋กœ p:first-child ์ด๋žฌ๋‹ค๊ฐ€ ํ•˜๋‚˜๋„ ์ ์šฉ์ด ์•ˆ๋ผ์„œ ์ด๊ฒŒ ์•„๋‹ˆ๋‹ค ์‹ถ์–ด์„œ ๊ฒ€์ƒ‰ํ•ด๋ณด๋‹ˆ

::first-letter๋ฅผ ์จ์•ผํ•œ๋‹ค๊ณ  ํ•œ๋‹ค. ์ฒซ ์ค„์€ ::first-line

 

๊ทธ๋ฆฌ๊ณ 

 

CSS3 Patterns Gallery

CSS3 Patterns Gallery Browser support The patterns themselves should work on Firefox 3.6+, Chrome, Safari 5.1, Opera 11.10+ and IE10+. However, implementation limitations might cause some of them to not be displayed correctly even on those browsers (for ex

projects.verou.me

์ด๋Ÿฐ๊ฒŒ ์žˆ์—ˆ๋Š”๋ฐ ๋’ท๋ฐฐ๊ฒฝ์— ์ €๋Ÿฐ ๋…ธํŠธํšจ๊ณผ๋ฅผ ์ฃผ๋Š” css๋„ ๋ณต์‚ฌํ•ด์˜ฌ ์ˆ˜ ์žˆ๊ณ  ์ง„์งœ ์‹ ๊ธฐํ–ˆ๋‹ค... ใ…Ž

๋…ธํŠธ ๋ฐฐ๊ฒฝ ์™ธ์—๋„ ๋‹ค์–‘ํ•œ๊ฒŒ ์žˆ์—ˆ๋‹ค.... ์ž˜ ์จ๋จน์–ด์•ผ๊ฒ ๋‹ค ใ…‹ใ…‹