Skills/CSS3, SCSS

220905 css_background_color.html

개발자 윤구나 2022. 9. 5. 16:27
<!DOCTYPE html>
<html lang="ko">
  <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>background_color</title>
    <style>
      /* default setting */
      * {margin: 0; padding: 0;}
      a {color: black; text-decoration: none;}
      li {list-style: none;}

      /* test */
      div {
        width: 300px; height: 300px;
        border: 1px solid black;
        text-align: center;
        line-height: 300px;
        float: left;
      }

      .box01 {background-color: green;}
      .box02 {background-color: rgb(0, 255, 0);}
      .box03 {background-color: #00ff00;}
      .box04 {background-color: rgba(0, 255, 0, 0.5);}
    </style>
  </head>
  <body>
    <div class="box01">box01</div>
    <div class="box02">box02</div>
    <div class="box03">box03</div>
    <div class="box04">box04</div>
  </body>
</html>