css 한줄쓰기
2022. 10. 14. 14:34ㆍCSS
1. Font
* font-style : 폰트 형태 등을 지정 (이탤릭 등)
* font-variant : 대문자↔소문자
* font-weight : 폰트 굵기
* font-size : 폰트 크기
* line-height : 폰트 높이값
* font-family : 폰트 글꼴
.p {
font-style: normal;
font-variant: normal;
font-weight: normal;
font-size: inherit;
line-height: normal;
font-family: inherit;
}
p {normal normal normal inherit/normal inherit}
- 폰트사이즈와 line-height를 같이 쓸 때는 / 를 넣어줌
2. Background
* background-color : 배경색
* background-image : 이미지
* background-repeat : 반복여부
* background-position : 위치
* background-size : 크기
* background-attachment : 배경이미지 스크롤 여부
div {
background-color: red;
background-image : url('');
background-repeat : no-repeat;
background-position : top left;
background-size : cover
background-attachment : scroll;
}
div {background : red url('') no-repeat top left/cover scroll;}
- 위치값과 크기를 같이 쓸 때는 / 를 넣어줌
3. transition
* transition-property : 변하는 속성 값. all, opacity, width 등 (여러개 지정할 경우 쉼표로 구분)
* transition-duration : transiton의 총 시간
* transition-timing-function : transition의 진행 속도 (ease, cubic-bezier 등)
* transition-delay : transition의 시작을 연기
div {
trnasition-property : all;
transition-duration : 3s;
transition-timing-function : ease;
transition-delay : 1s;
}
div {all 3s ease 1s;}
'CSS' 카테고리의 다른 글
css + js ) input date 커스텀 (0) | 2022.11.29 |
---|---|
tab Menu - input type radio (input 라디오로 탭메뉴 만들기) (0) | 2022.10.18 |
플로팅 메뉴 (시간차 메뉴 나오기) (0) | 2022.08.30 |
border 겹침 없애기 (0) | 2022.07.21 |
글자 말줄임 처리 (... 처리하기) + 원하는 만큼 문장 자르기 (0) | 2022.07.05 |