Home > Web Front-end > JS Tutorial > body text

原生Js实现元素渐隐/渐现(原理为修改元素的css透明度)_javascript技巧

WBOY
Release: 2016-05-16 17:31:31
Original
1658 people have browsed it

经常看到网页里图片渐变显示,自己写一个。
原理很简单就是修改元素的css透明度。
在线预览效果:http://jsfiddle.net/dtdxrk/BHUp9/embedded/result/

复制代码 代码如下:





原生Js元素渐隐/渐显方法




原生Js实现元素渐隐/渐现(原理为修改元素的css透明度)_javascript技巧



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!