CSS : Text property (텍스트 꾸미기)

Ryan·2020년 10월 11일
0

CSS

목록 보기
3/13
post-thumbnail

텍스트를 꾸미는 기본 속성들에 대해 알아보자.

1) 폰트 굵기

p {
  font-weight: bold;
}
  • bold : 굵게
  • normal : 보통

2) 정렬(텍스트)

h1 {
  text-align: right;
} 
  • center: 중앙 정렬
  • left: 좌측 정렬
  • right: 우측 정렬

3) 컬러(텍스트, 배경)

h1 {
  color: red;
  background-color: blue;
}
  • rgb(,,) : rgb코드 입력
  • ##0000 : hex color 입력
  • red : 영어로 컬러명 입력

4) 불투명도

.class {
  opacity: 0.5;
}

5) 배경이미지

.class {
  background-image: url("http://www.jpg")
}

6) Important

p {
  color: blue !important;
}
profile
"꾸준한 삽질과 우연한 성공"

0개의 댓글