Tiny Bunny
๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ’ป/CSS

๋ฉ”๋ชจ ์›น ๋งŒ๋“ค์–ด๋ณด๊ธฐ

by soonybutter 2024. 1. 7.
728x90

css๋ฅผ ๋ฐฐ์šฐ๊ธฐ ์ „์— html ๋งŒ์œผ๋กœ ๋งŒ๋“ค์–ด๋ดค๋˜ ๋ฉ”๋ชจ์žฅ html์— ์ง€๊ธˆ๊นŒ์ง€ ๋ฐฐ์šด css๋ฅผ ์ ์šฉ์‹œ์ผœ๋ดค๋‹ค.

โ€‹

์‚ฌ์‹ค ๋‚ด๊ฐ€ ์ตœ์ข…์ ์œผ๋กœ ๋ชฉํ‘œํ•˜๋Š” ๊ฒƒ์€ ํŠน์ •ํ•œ ๋ฉ”๋ชจ๋ฅผ ์ ์„ ์ˆ˜ ์žˆ๋Š” ์›น ์‚ฌ์ดํŠธ๋ฅผ ๋งŒ๋“ค์–ด์„œ

์ง์ ‘ ์ด ์›น์— ๋ถˆํŠน์ • ๋‹ค์ˆ˜์˜ ์œ ์ €๊ฐ€ ์ ‘์†ํ•˜๋ฉด, ์œ ์ €๋“ค ๊ฐ์ž์˜ ๋งˆ์Œ๋Œ€๋กœ ๋ฉ”๋ชจ๋ฅผ ๊ธฐ๋กํ•  ์ˆ˜ ์žˆ๋Š” ์›น ์‚ฌ์ดํŠธ๋ฅผ ๋งŒ๋“œ๋Š”๊ฒŒ ๋ชฉํ‘œ์ง€๋งŒ!! -> ์ด๊ฑด ์ž๋ฐ”๋ฅผ ๋ฐฐ์›Œ์•ผ ๋น„๋กœ์†Œ ๊ฐœ๋ณ„์ ์ธ ๋ฉ”๋ชจ๋ฅผ ์ฑ„์›Œ๋„ฃ์„ ์ˆ˜ ์žˆ๋‹ค .!!

โ€‹

๊ทธ๋ž˜์„œ ์ผ๋‹จ ์ž๋ฐ”๋ฅผ ์ ์šฉํ•˜๊ธฐ ์ด์ „ ๋‹จ๊ณ„๊นŒ์ง€

์ง€๊ธˆ๊นŒ์ง€ ๊ณต๋ถ€ํ•œ css์™€ html์„ ๋ฐ”ํƒ•์œผ๋กœ ํฌ์ŠคํŠธ์ž‡์„ ๊ตฌํ˜„์‹œํ‚จ ๊ธฐ๋ก์ด ๋˜๊ฒ ๋‹ค. ๐Ÿ˜†

โ€‹


โ€‹

โ€‹

1.ํฌ์ŠคํŠธ์ž‡ 1

โ€‹

์ผ๋‹จ ์ฒ˜์Œ์— ์‹ฑ๊ธ€ ํฌ์ŠคํŠธ์ž‡์„ ๋งŒ๋“ค์–ด๋ณด๋Š” ์—ฐ์Šต์„ ํ–ˆ๋‹ค.

์ด๋ ‡๊ฒŒ ํฌ์ŠคํŠธ์ž‡ ํ•˜๋‚˜๋ฅผ ๋งŒ๋“ค์—ˆ๋‹ค.

์ฒ˜์Œ css์ ์šฉ์€ ์€๊ทผ ์ƒ๊ฐํ•  ๊ฒŒ ๋งŽ์•˜๋‹ค.

โ€‹

-box shadow๋ฅผ ์„ค์ •ํ•˜๋Š”๊ฒŒ ์กฐ๊ธˆ ์ƒ๊ฐ์„ ํ•ด์•ผํ–ˆ์Œ.

-id ์†์„ฑ์€ #ํƒœ๊ทธ๋กœ ๋‚˜ํƒ€๋ƒ„.

 

์œ„์˜ single ํฌ์ŠคํŠธ์ž‡์„ ๋งŒ๋“  ์ฝ”๋“œ๋Š” ์ด๋ ‡๋‹ค.

Memo!_ single

์˜ค๋Š˜์˜ ์‹œ

๋‚ด๊ฐ€ ๊ทธ๋‹ค์ง€ ์‚ฌ๋ž‘ํ•˜๋˜ ๊ทธ๋Œ€์—ฌ
๋‚ด ํ•œํ‰์ƒ์— ์ฐจ๋งˆ ๊ทธ๋Œ€๋ฅผ ์žŠ์„ ์ˆ˜ ์—†์†Œ์ด๋‹ค
๋‚ด ์ฐจ๋ก€์— ๋ชป ์˜ฌ ์‚ฌ๋ž‘์ธ ์ค„์€ ์•Œ๋ฉด์„œ๋„
๋‚˜ ํ˜ผ์ž๋Š” ๊พธ์ค€ํžˆ ์ƒ๊ฐํ•˜๋ฆฌ๋‹ค
์ž, ๊ทธ๋Ÿฌ๋ฉด ๋‚ด๋‚ด ์–ด์—ฌ์˜์†Œ์„œ.

์ด์ƒ_ ์ด๋Ÿฐ ์‹œ

 

2. ํฌ์ŠคํŠธ์ž‡ -์—ฌ๋Ÿฌ๊ฐœ ๋ถ™์ธ ๋ชจ์Šต ๊ตฌํ˜„ํ•ด๋ณด๊ธฐ

์ตœ์ข…์ ์œผ๋กœ ์›น ์‚ฌ์ดํŠธ๋ฅผ ๋งŒ๋“ค์—ˆ์„ ๋•Œ์˜ ํ‹€(?)์„ ๋งŒ๋“ค์–ด ๋ณด์•˜๋‹ค.

์•„์ง ์ž๋ฐ”๋ฅผ ์•ˆ ๋ฐฐ์›Œ์„œ ์›น์œผ๋กœ ์ ‘์†ํ•œ ๊ฐœ๊ฐœ์ธ์ด ๋ฉ”๋ชจํ•  ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋Šฅ์€ ๋ชป ๋งŒ๋“ค๊ธฐ์— ..ใ…Ž

์ž„์˜์˜ ๋ฉ”๋ชจ๋“ค์„ ์ฑ„์›Œ๋„ฃ์€ ์ƒํ™ฉ์ด๋‹ค.

์ „๋ฐ˜์ ์ธ ํฐ~~~! ํ‹€์€ ์ด๋ ‡๊ฒŒ ๋งŒ๋“ค์–ด๋ณด๊ณ  ์‹ถ๋‹ค!

 

์ฝ”๋“œ๋„ ๊ธฐ๋กํ•ด๋‘๊ธฐ!

<style>
        @import url('https://fonts.googleapis.com/css2?family=Indie+Flower&display=swap');
        *{
            margin:0;
            padding:0'
        }
        h2{
            font-weight: bold;
            font-size:30px;
        }
        p{
            font-size: 25px;
            font-weight: normal;
        }
        ul,li{
            list-style-type: none;
            margin: 10px;
        }
        ul{
            display:flex;
            flex-wrap: wrap;
            justify-content: center;;
        }
        .a{
            font-family: 'Indie Flower';
            
        }
        body {
            margin: 20px auto;
            font-family: 'Indie Flower';
            background:#4e2b09;
            color:#fff;
        }

        ul li a {
            width: 250px;
            height: 250px;
            border:1px solid black;
            padding:10px;
            display: block;
            background: #ffc;
            text-decoration: none;
            box-shadow: 5px 5px 7px rgba(33,33,33,.7);
            transition: transform .15s linear;
        }
        ul li:nth-child(even) a{
            transform:rotate(4deg);
            position:relative;
            top:5px;
        }
        ul li:nth-child(3n) a{
            transform: rotate(-4deg);
            position: relative;
            top:-5px;
        }
        ul li:nth-child(5n) a{
            transform: rotate(5deg);
            position: relative;
            top: -10px;

        }
        ul li:hover, ul li a:focus{
            animation-duration: 2s;
            transform: scale(1.1);
            position:relative;
            z-index: 3; 
        }
        
    </style>

 

๋นจ๋ฆฌ ๋” ๋งŽ์€ c์–ธ์–ด์™€ ์ฝ”๋”ฉ๊ณต๋ถ€๋ฅผ ํ•ด์„œ ๊ฐœ๋ณ„์ ์œผ๋กœ ๋ฉ”๋ชจํ•  ์ˆ˜ ์žˆ๋Š” ์›น ์‚ฌ์ดํŠธ๋ฅผ ๋งŒ๋“ค์–ด๋ณด๊ณ ์‹ถ๋‹ค,

728x90

TOP

Designed by ํ‹ฐ์Šคํ† ๋ฆฌ