[CSS] Class

킴스·2021년 6월 22일
1

CSS

목록 보기
7/7
post-thumbnail

class

  • .class 명 {} 으로 속성 적용.
  • 여러개의 태그에 적용하여 한번에 변경 가능.
  • class 생성시 띄어쓰기를 통해 여러 값의 class 적용가능.

웹 페이지 화면

실제 작성 코드

    <style>
      body {
        background-color: sandybrown;
      }
      .c {
        padding: 10px;
        border-radius: 50%;
        border: 10px;
      }
      .a {
        background-color: seashell;
        color: tomato;
      }
      .b {
        background-color: slategrey;
        color: springgreen;
      }
    </style>
  </head>
  <body>
    <h1>This is website</h1>
    <span class="a c">a</span>
    <span class="b c">b</span>
    <span class="a c">c</span>
    <span class="b c">d</span>
    <span class="a c">e</span>
    <span class="b c">f</span>
  </body>
</html>

새로 배운 것

여러개의 id 값을 한번에 적용할 수 있음.

느낀점

원하는 이미지의 값을 도출하려면 노가다 필요한듯..

profile
코뽀

0개의 댓글