设置转换效果所针对的 CSS 属性名称。
要设置过渡效果所针对的 CSS 属性名称,请使用 CSS transition-property。
以下示例中,我们已将属性设置为 width 并同时设置了持续时间
示例
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 150px;
height: 150px;
background: blue;
transition-property: width;
transition-duration: 3s;
}
div:hover {
width: 250px;
}
</style>
</head>
<body>
<h1>Heading One</h1>
<p>Hover over the below box to change its width.</p>
<div></div>
</body>
</html>
广告
数据结构
网络
RDBMS
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
JavaScript
PHP