It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center。
已关闭8年。
如何使用CSS或jQuery动画化元素的“不透明度”?
已关闭8年。
如何使用CSS或jQuery动画化元素的“不透明度”?
最佳答案
当然,使用CSS过渡:
div {
opacity: 1;
-moz-transition: all 0.3s ease-out; /* FF4+ */
-o-transition: all 0.3s ease-out; /* Opera 10.5+ */
-webkit-transition: all 0.3s ease-out; /* Safari 3.2+, Chrome */
-ms-transition: all 0.3s ease-out; /* IE10+ */
transition: all 0.3s ease-out; /* standard format */
}
div:hover {
opacity: 0.3;
}
<div>Hover over me with your mouse!</div>
<div>Hover over me with your mouse!</div>
<div>Hover over me with your mouse!</div>
<div>Hover over me with your mouse!</div>
<div>Hover over me with your mouse!</div>
<div>Hover over me with your mouse!</div>
关于jquery - 元素的不透明度动画,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/5708874/
10-13 01:37