使用CSS过渡计时功能设置不同的速度曲线
要使用过渡计时功能设置不同的速度曲线,您可以尝试运行以下代码
示例
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 100px;
height: 100px;
background: red;
transition: width 4s;
}
#effect1 {
transition-timing-function: linear;
}
#effect2 {
transition-timing-function: ease-in;
}
#effect3 {
transition-timing-function: ease-out;
}
div:hover {
width: 250px;
}
</style>
</head>
<body>
<h1>Transition Effect</h1>
<p>Hover over the div elements and see the transition effect and the speed:</p>
<div id = "effect1">linear effect</div><br>
<div id = "effect2">ease-in effect</div><br>
<div id = "effect3">ease-out effect</div><br>
</body>
</html>热门推荐
10 八一幼儿祝福语大全简短
11 公司乔迁食堂祝福语简短
12 婚礼结束聚餐祝福语简短
13 儿媳买车妈妈祝福语简短
14 毕业送礼老师祝福语简短
15 同事辞职正常祝福语简短
16 恭贺新婚文案祝福语简短
17 金店立秋祝福语简短英文
18 婆婆高寿祝福语大全简短