设置 CSS 过渡效果完成所需的时间(秒或毫秒)
在 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>
广告
数据结构
网络
RDBMS
操作系统
Java
iOS
HTML
CSS
Android
Python
C 语言
C++
C#
MongoDB
MySQL
Javascript
PHP