使用CSS中的?transition-duration屬性來設置CSS過渡效果完成所需的秒數或毫秒數?
示例
實時演示
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 150px;
height: 150px;
background: blue;
transition-property: height;
transition-duration: 2s;
}
div:hover {
height: 200px;
}
</style>
</head>
<body>
<h1>Heading One</h1>
<p>Hover over the below box to change its height.</p>
<div></div>
</body>
</html>
登錄后復制
以上就是設置 CSS 過渡效果需要多少秒或毫秒才能完成的詳細內容,更多請關注www.92cms.cn其它相關文章!






