mgGlitch.js 介绍
mgGlitch.js是一款能够模拟显示器故障效果的jQuery插件。mgGlitch.js能够为页面中的任何元素制作错屏效果,就像显示器发生故障时的画面在闪动的效果。
mgGlitch.js使用
1、引入
<script src="path/to/jquery.min.js"></script>
<script src="path/to/mgGlitch.js"></script>
2、html
<div class="container">
<div class="glitch-img" background-image: url('img/1.jpg"></div>
</div>
3、初始化
$( function() {
$( ".glitch-img" ).mgGlitch({
destroy : false,// set 'true' to stop the plugin
glitch: true,// set 'false' to stop glitching
scale: true,// set 'false' to stop scaling
blend : true,// set 'false' to stop glitch blending
blendModeType : 'hue',// select blend mode type
glitch1TimeMin : 600,// set min time for glitch 1 elem
glitch1TimeMax : 900,// set max time for glitch 1 elem
glitch2TimeMin : 10,// set min time for glitch 2 elem
glitch2TimeMax : 115,// set max time for glitch 2 elem
zIndexStart : 8,// because of absolute position,set z-index base value
});
});
网站地址:https://codepen.io/hmongouachon/pen/LZGwWY
GitHub:https://github.com/hmongouachon/mgGlitch
网站描述:一款能够模拟显示器故障效果的jQuery插件
mgGlitch.js
官方网站:https://codepen.io/hmongouachon/pen/LZGwWY
小编说
以上是编程之家为你收集整理的mgGlitch.js全部内容。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。