标题点击水波滑动效果 带滑动效果

前端之家收集整理的这篇文章主要介绍了标题点击水波滑动效果 带滑动效果前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

<table class="html5"><tr class="li1">
<td class="ln"><pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131

>   >     >     >RunJS>     >     >     >     ul {         font-size: 0;         position: relative;         padding: 0;         width: 480px;         margin: 40px auto;         user-select: none;     }         li {         display: inline-block;         width: 160px;         height: 60px;         background: #E95546;         font-size: 16px;         text-align: center;         line-height: 60px;         color: #fff;         text-transform: uppercase;         position: relative;         overflow: hidden;         cursor: pointer;     }         .slider {         display: block;         position: absolute;         bottom: 0;         left: 0;         height: 4px;         background: #4FC2E5;         transition: all 0.5s;     }         .ripple {         width: 0;         height: 0;         border-radius: 50%;         background: rgba(255,255,0.4);         -webkit-transform: scale(0);         -ms-transform: scale(0);         transform: scale(0);         position: absolute;         opacity: 1;     }         .rippleEffect {         -webkit-animation: rippleDrop .4s linear;         animation: rippleDrop .4s linear;     }         @-webkit-keyframes rippleDrop {         100% {             -webkit-transform: scale(2);             transform: scale(2);             opacity: 0;         }     }         @keyframes rippleDrop {         100% {             -webkit-transform: scale(2);             transform: scale(2);             opacity: 0;         }     }     > >   >     >         >Tab One>         >Tab Two>         >Tab Three>         ><>     > > > $("ul li").click(function(e) {       if ($(this).hasClass('slider')) {         return;     }       var whatTab = $(this).index();       var howFar = 160 * whatTab;       $(".slider").css({         left: howFar + "px"     });       $(".ripple").remove();       var posX = $(this).offset().left,        posY = $(this).offset().top,        buttonWidth = $(this).width(),        buttonHeight = $(this).height();       $(this).prepend(" ><>");       if (buttonWidth >= buttonHeight) {         buttonHeight = buttonWidth;     } else {         buttonWidth = buttonHeight;     }       var x = e.pageX - posX - buttonWidth / 2;     var y = e.pageY - posY - buttonHeight / 2;       $(".ripple").css({         width: buttonWidth,        height: buttonHeight,        top: y + 'px',        left: x + 'px'     }).addClass("rippleEffect");   }); >   >  404_73@

猜你在找的程序笔记相关文章