"CSS transition-property"의 두 판 사이의 차이

17번째 줄: 17번째 줄:
| ''property'' || 지정한 속성들에 transition 적용 ★
| ''property'' || 지정한 속성들에 transition 적용 ★
|}
|}
==예시: all==
<source lang='html5'>
<style>
.box {
text-align: center;
width: 100px;
height: 100px;
background: blue;
color: white;
font-size: 12px;
transition: all 3s;
}
.box:hover {
background: red;
width: 300px;
height: 300px;
color: black;
font-size: 36px;
}
</style>
<div class='box'>안녕 친구들</div>
</source>
:→ 너비, 높이, 배경색, 글자색, 글자크기 모두 동시에 transition
:→ 예제: http://jmnote.com/css/transition3.php


==같이 보기==
==같이 보기==

2014년 11월 24일 (월) 20:02 판

CSS transition-property Property
CSS transition-property 속성

1 목록

  • transition-property를 지정하면 지정한 것들만 transition(점진적 변화)됨
예: background, width, height, outline, color, font-size 등
  • all로 하면 모든 속성에 transition 효과가 적용됨
  • none으로 하면 모든 속성에 transition 효과가 비활성화됨
설명
none 모든 속성에 transition 비활성화
all 모든 속성에 transition 적용 ★
property 지정한 속성들에 transition 적용 ★

2 예시: all

<style> 
.box {
	text-align: center;
	width: 100px;
	height: 100px;
	background: blue;
	color: white;
	font-size: 12px;
	transition: all 3s; 
}
.box:hover {
	background: red;
	width: 300px;
	height: 300px;
	color: black;
	font-size: 36px;
}
</style>
<div class='box'>안녕 친구들</div>
→ 너비, 높이, 배경색, 글자색, 글자크기 모두 동시에 transition
→ 예제: http://jmnote.com/css/transition3.php

3 같이 보기

4 참고 자료

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}