Lazer Linez是一个jQuery插件,它可以为您的网站添加复古的80年代风格的几何渐变线。
有了这个插件,你可以使用几何线网格来创建80年代风格的霓虹灯标志的效果。无论是电影标题、海报还是一些图像文本,添加一些rad渐变效果总是一个好主意。
1.在jQuery之后加载Lazer Linez插件的缩小版。
- <script src="/path/to/cdn/jquery.slim.min.js"></script>
- <script src="/path/to/jquery.lazerlinez.min.js"></script>
2.调用函数拉泽利内兹
在要生成渐变线的目标元素上。
- $(function(){
- $(selector).lazerlinez();
- });
3.通过覆盖以下选项来自定义线条。
- $(selector).lazerlinez({
- // beginning color
- 'start_color' : 'goldenrod',
- // ending color of the linez
- 'end_color' : '#b2d',
- // thickness % of first space
- 'first_gap' : .2,
- // thickness % of first line
- 'first_line' : 4,
- // thickness % of last space
- 'last_gap' : 4,
- // thickness % of last line
- 'last_line' : .1,
- // number of lines to generate
- 'num_linez' : 10,
- // top, right, bottom, left
- 'position' : 'top',
- // thickness % of additional start_color
- 'extend_start' : 55,
- // z-index property
- 'z' : '1',
- // additional CSS classes
- 'add_class' : ''
- });