CSS

vancouver·2023년 4월 12일
0

CSS 이해하기

목록 보기
1/23
body {
    background-color: #eaf6f6;
}
hr {
    border-style: none;
    border-top-style: dotted;
    border-color: grey;
    border-width: 5px;
    width: 5%;
}

h1 {
    color: #66bfbf ;
}

h3 {
    color: darkviolet;
}



CLASS SELECTOR

 <img class="bacon" src="https://em-content.zobj.net/thumbs/120/apple/354/bacon_1f953.png" alt="bacon-img">
  <img class="broccoli" src="https://em-content.zobj.net/thumbs/120/apple/354/broccoli_1f966.png" alt="broccoli-img">

/***********************TAG SELECTOR***********************/

h1 {
    color: blue; 
     font-size: 100px;
}

img {

    background-color: red;  /*background-color 보다 class가 우선순위*/
  }


  /***********************CLASS SELECTOR***********************/

  .bacon {
    background-color: green;
  }

  .broccoli {

    background-color: red; 
  }

Reference

[border]

https://developer.mozilla.org/en-US/docs/Web/CSS/border

[background-color]

https://developer.mozilla.org/en-US/docs/Web/CSS/background-color

0개의 댓글