transition Css3 상세 정보
6724 단어 transition
:
.example {
transition-property: background-color; // css
transition-duration: 2s; //
transition-timing-function: ease-in; //
transition-delay: 1s; //
}
css :
:
example {
transition: background-color 2s ease-in 1s;
}
:
.example {
transition: background-color 2s ease-in 1s,
width 2s ease-in-out,
height 3s ease-out;
}
:---- click hover
1、 , hover 1s ;
.example {
background-color: green;
transition: background-color 2s ease-in 1s;
}
.example:hover {
background-color: blue
}
2、 , , " " 。
.example {
width: 200px;
height: 200px;
transition: width 2s ease-in;
}
.example:active {
width: 400px;
}
3、 input ;
input {
width: 200px;
transition: width 2s ease-in;
}
input:focus {
width: 250px;
}
4、 ;
.example {
width: 200px;
height: 200px;
background:#000;
-webkit-transition: width 2s ease,
height 2s ease, background 2s ease;
-webkit-transform: translateZ(0);
}
.example:hover {
width: 300px;
height: 300px;
background:green;
}
CSS :
[css]
#timings-demo {border: 1px solid #ccc;padding: 10px;height: 400px;width: 400px;}
.box {width: 100px;height: 50px;line-height: 50px;text-align: center;color: #fff;margin-bottom: 10px;
-webkit-border-radius: 5px;
-webkit-box-shadow: inset 0 0 5px rgba(102, 153, 0,0.5);
}
/* :*/
#ease {background: #f36;
-webkit-transition: all 5s ease 0.3s;
}
/* :*/
#ease-in {background: #369;
-webkit-transition: all 3s ease-in 0.5s;
}
/* :*/
#ease-out {background: #636;
-webkit-transition: all 5s ease-out 0s;
}
/* :*/
#ease-in-out {background: #3e6;
-webkit-transition: all 1s ease-in-out 2s;
}
/* :*/
#linear { background: #999;
-webkit-transition: all 6s linear 0s;
}
/* :*/
#cubic-bezier {background: #6d6;
-webkit-transition: all 4s cubic-bezier 1s;
}
/*hover click box */
#timings-demo:hover .box {
-webkit-transform: rotate(360deg) scale(1.2);
-webkit-border-radius: 25px;
}
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
iOS Development - LifecycleIn order to handle the data preservation in the case of application suspension, suspension, etc., or to add the required...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.