HTML&CSS 17์ผ์ฐจ (์ •๋ฆฌx)

2024. 3. 23. 22:09ยท๐Ÿ’œ HTML,CSS
728x90
๋ฐ˜์‘ํ˜•
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>์„ ํ˜•/์›ํ˜• ๊ทธ๋ผ๋ฐ์ด์…˜</title>
</head>
<style>
  div {
    display: inline-block; /* inline์œผ๋กœ๋งŒํ•˜๋ฉด width height ๊ฐ’ ์•ˆ๋จน์Œ */
    width: 500px;
    height: 300px;
    border-radius: 10px;
  }
  .grad1{
    background-color: blue;
    /* (0,0)์ด ๊ธฐ์ค€์ด๋‹ˆ, ์˜ค๋ฅธ์ชฝ ๋ฐ‘์œผ๋กœ blue์—์„œ white๋กœ ๊ทธ๋ผ์ด์–ธํŠธ ๋งŒ๋“ค์–ด๋ผ */
    background: linear-gradient(to right bottom, lightblue, lightgoldenrodyellow);
  }
  .grad2{
    background-color: green;
    /* deg: ๊ฐ๋„. 45deg => 45๋„ => ์˜ค๋ฅธ์ชฝ ์œ„ ๋ฐฉํ–ฅ */
    background: linear-gradient(45deg, lightpink, mediumpurple);
  }
  .grad3{
    background-color: red;
    /* 30% ์œ„์น˜์— ์ƒ‰์ƒ ์ค‘์ง€์ ์„ ์ง€์ •ํ•œ๋‹ค */
    background: linear-gradient(to bottom, yellowgreen,lightgoldenrodyellow 50%, aquamarine);
  }

  /***********************************************/

  .rad1{
    background-color: mediumpurple;
    /* ํƒ€์›ํ˜•์œผ๋กœ ํฐ์ƒ‰, ๋…ธ๋ž€์ƒ‰, ๋นจ๊ฐ„์ƒ‰์œผ๋กœ ๋ฐ”๋€Œ๋Š” ์›ํ˜• ๊ทธ๋ผ๋ฐ์ด์…˜ */
    background: radial-gradient(white, lightyellow, indianred);
  }
  .rad2{
    background-color: mediumpurple;
    /* ์›ํ˜•์œผ๋กœ ํฐ์ƒ‰, ๋…ธ๋ž€์ƒ‰, ๋นจ๊ฐ„์ƒ‰์œผ๋กœ ๋ฐ”๋€Œ๋Š” ์›ํ˜• ๊ทธ๋ผ๋ฐ์ด์…˜ */
    background: radial-gradient(circle ,white, lightyellow, indianred);
  }
  .rad3{
    background-color: mediumpurple;
    /*
      closest-side : ๊ทธ๋ผ๋ฐ์ด์…˜ ์ค‘์‹ฌ์—์„œ ๊ฐ€์žฅ ๊ฐ€๊นŒ์šด ์ธก๋ฉด์— ๋‹ฟ์„ ๋•Œ๊นŒ์ง€
      closest-corner: ๊ทธ๋ผ๋ฐ์ด์…˜ ์ค‘์‹ฌ์—์„œ ๊ฐ€์žฅ ๊ฐ€๊นŒ์šด ๊ผญ์ง“์ ์— ๋‹ฟ์„ ๋•Œ๊นŒ์ง€
      farthest-side: ๊ทธ๋ผ๋ฐ์ด์…˜ ์ค‘์‹ฌ์—์„œ ๊ฐ€์žฅ ๋ฉ€๋ฆฌ ๋–จ์–ด์ง„ ์ธก๋ฉด์— ๋‹ฟ์„ ๋•Œ๊นŒ์ง€
      farthest-corner: ๊ทธ๋ผ๋ฐ์ด์…˜ ์ค‘์‹ฌ์—์„œ ๊ฐ€์žฅ ๋ฉ€๋ฆฌ ๋–จ์–ด์ง„ ๊ผญ์ง“์ ์— ๋‹ฟ์„ ๋•Œ๊นŒ์ง€
     */
    background: radial-gradient(closest-side, white, lightyellow, palevioletred);
  }
  .rad4{
    /* 20%์—์„œ ์‹œ์ž‘ํ•ด์„œ ํฐ์ƒ‰์—์„œ ํŒŒ๋ž€์ƒ‰์œผ๋กœ ๋ฐ”๋€Œ๋Š” ์›ํ˜• ๊ทธ๋ผ๋ฐ์ด์…˜ */
    /* ๊ฐ€์šด๋ฐ์—์„œ ์‹œ์ž‘ํ•˜๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ผ ์ค‘์‹ฌ ์œ„์น˜๋ฅผ ์ง€์ •ํ•  ์ˆ˜ ์žˆ๋‹ค. */
    background: radial-gradient(circle at 20% 20%, ghostwhite, cornflowerblue);
  }

  /*************************************************************/

  .pat1{
    background: repeating-linear-gradient(yellow, palevioletred 50px, palevioletred 20px, darkred 20px);
  }
  .pat2{
    background: repeating-linear-gradient(black, black 20px, white 20px, white 40px);
  }

</style>
<body>
  <section>
    <div class="grad1"></div>
    <div class="grad2"></div>
    <div class="grad3"></div>
  </section>
  <section>
    <div class="rad1"></div>
    <div class="rad2"></div>
    <div class="rad3"></div>
    <div class="rad4"></div>
  </section>
  <section>
    <div class="pat1"></div>
    <div class="pat2"></div>
  </section>
</body>
</html>

728x90
๋ฐ˜์‘ํ˜•
์ €์ž‘์žํ‘œ์‹œ ๋น„์˜๋ฆฌ ๋ณ€๊ฒฝ๊ธˆ์ง€ (์ƒˆ์ฐฝ์—ด๋ฆผ)

'๐Ÿ’œ HTML,CSS' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

HTML&CSS ์‹ค์Šต6 (์ •๋ฆฌx)  (0) 2024.03.23
HTML&CSS 18์ผ์ฐจ (์ •๋ฆฌx)  (0) 2024.03.23
HTML&CSS ์‹ค์Šต5 (์ •๋ฆฌx)  (0) 2024.03.23
HTML&CSS 16์ผ์ฐจ (์ •๋ฆฌx)  (0) 2024.03.23
HTML&CSS 15์ผ์ฐจ (์ •๋ฆฌx)  (0) 2024.03.23
'๐Ÿ’œ HTML,CSS' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€
  • HTML&CSS ์‹ค์Šต6 (์ •๋ฆฌx)
  • HTML&CSS 18์ผ์ฐจ (์ •๋ฆฌx)
  • HTML&CSS ์‹ค์Šต5 (์ •๋ฆฌx)
  • HTML&CSS 16์ผ์ฐจ (์ •๋ฆฌx)
Genie_.
Genie_.
๋‚ด๊ฐ€ ๊ณต๋ถ€ํ•˜๋Š” ์ง€์‹์„ ๋ณต์Šตํ•˜๊ณ  ๊ธฐ๋กํ•˜๋Š” ๊ณต๊ฐ„์ž…๋‹ˆ๋‹ค ๐Ÿ’ฌ
  • Genie_.
    Geine Dev
    Genie_.
  • ์ „์ฒด
    ์˜ค๋Š˜
    ์–ด์ œ
    • ์ „์ฒด (153)
      • ๐Ÿ•น๏ธ ์ฝ”๋”ฉํ…Œ์ŠคํŠธ (37)
        • ์ฝ”๋“œํŠธ๋ฆฌ (13)
        • ๋ฐฑ์ค€ (17)
        • ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค (7)
      • ๐Ÿงก JavaScript (9)
      • ๐Ÿ’™ React (0)
      • ๐Ÿ’œ HTML,CSS (38)
      • ๐Ÿ’š Spring (6)
      • โค๏ธ JAVA (13)
        • Basic (13)
      • ๐ŸŒŸ CS (1)
      • โ„๏ธ ๋‚ด์ผ๋ฐฐ์›€์บ ํ”„ 7๊ธฐ (41)
      • ๐Ÿ… ์ž๊ฒฉ์ฆ (6)
        • ์ •๋ณด์ฒ˜๋ฆฌ๊ธฐ์‚ฌ (0)
        • SQLD (3)
        • ์ปดํ“จํ„ฐํ™œ์šฉ๋Šฅ๋ ฅ2๊ธ‰ (3)
      • ๐Ÿ—จ GIT (1)
      • ๐ŸŒฐ ์Šคํ„ฐ๋”” (1)
  • ๋ธ”๋กœ๊ทธ ๋ฉ”๋‰ด

    • ํ™ˆ
    • ๊ธ€์“ฐ๊ธฐ
  • ๊ณต์ง€์‚ฌํ•ญ

    • ๋ฉ”๋ชจ
  • ๋ฐ˜์‘ํ˜•
  • hELLOยท Designed By์ •์ƒ์šฐ.v4.10.0
Genie_.
HTML&CSS 17์ผ์ฐจ (์ •๋ฆฌx)
์ƒ๋‹จ์œผ๋กœ

ํ‹ฐ์Šคํ† ๋ฆฌํˆด๋ฐ”