系统城装机大师 - 固镇县祥瑞电脑科技销售部宣传站!

当前位置:首页 > 网页制作 > CSS > 详细页面

css3鼠标滑过实现动画线条边框

时间:2023-03-06来源:系统城装机大师作者:佚名

现如今网页越来越趋近于动画,相信大家平时浏览网页或多或少都能看到一些动画效果,今天我们做一个通过 css3 鼠标滑过实现动画线条边框,下面一起看看吧。


实现效果

在这里插入图片描述

CSS3实现的鼠标滑过边框线条动画特效源码

完整源码

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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
<template>
    <div class="parentBox">
        <div class="contantBox">
            <ul class="shelfBox">
                <li>
                    <div class="bigBox">
                        <div class="itemBox">
                            <div class="textBox">
                                <p>1.无需下载安装包</p>
                                <p>2.可多人同时编辑</p>
                                <p>3.无需下载安装包</p>
                                <p>4.可实时预览内容</p>
                            </div>
                            <div class="beginbox"></div>
                            <div class="bomBox"></div>
                            <div class="leftBox"></div>
                            <div class="topBox"></div>
                            <div class="rightBox"></div>
                            <div class="pictureBox"><i class="circleBox"></i></div>
                        </div>
                        <div class="iconBox">
                            <div class="circleBox">+</div>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </div>
</template>
<style scoped>
    .parentBox {
        margin: 0;
        padding: 0;
        border: 0;
        font: inherit;
        font-size: 100%;
        vertical-align: baseline
    }
 
    ol,
    ul {
        list-style: none
    }
 
    table {
        border-collapse: collapse;
        border-spacing: 0
    }
 
    caption,
    td,
    th {
        text-align: left;
        font-weight: 400;
        vertical-align: middle
    }
 
    .bigBox img {
        border: none
    }
 
 
    .bigBox {
        text-decoration: none
    }
 
    .bigBox:hover {
        cursor: pointer;
    }
 
    img {
        max-width: 100%;
        vertical-align: middle
    }
 
    .shelfBox:after,
    .shelfBox:before {
        content: " ";
        display: table
    }
 
    .shelfBox:after {
        clear: both
    }
 
    .contantBox {
        position: relative;
        background-color: #fff;
        zoom: 1
    }
 
 
    .contantBox ul {
        position: absolute;
        left: 0;
        top: 0;
        width: 1218px;
        height: 432px;
        padding-top: 5px;
        transition: left .8s ease-in-out
    }
 
    .contantBox li {
        float: left;
        width: 406px;
        height: 216px
    }
 
    .contantBox li .bigBox {
        position: relative;
        display: block;
        width: 100%;
        height: 216px;
        padding: 10px 0 0 92px;
        zoom: 1
    }
 
    .contantBox .itemBox {
        position: relative;
        width: 274px;
        height: 186px;
        padding: 20px 0 0 60px;
        background: url('https://hovertree.com/texiao/css3/32/images/hovertree10tanjpxxxxblxpxxxxxxxxxx-274-186.png') 0 0 no-repeat;
        color: #00a0ff;
        zoom: 1
    }
 
    .textBox {
        color: #666;
    }
    .textBox p{
        margin: 14px 10px;
    }
 
    .contantBox .beginbox {
        position: absolute;
        bottom: -2px;
        right: -2px;
        width: 34px;
        height: 10px;
        background-color: #fff
    }
 
    .contantBox .bomBox {
        position: absolute;
        left: -2px;
        bottom: -2px;
        width: 295px;
        height: 15px;
        background-color: #fff
    }
 
    .contantBox .leftBox {
        position: absolute;
        left: -2px;
        top: -2px;
        width: 15px;
        height: 189px;
        background-color: #fff
    }
 
    .contantBox .topBox {
        position: absolute;
        right: -2px;
        top: -2px;
        width: 295px;
        height: 15px;
        background-color: #fff
    }
 
    .contantBox .rightBox {
        position: absolute;
        right: -2px;
        bottom: -2px;
        width: 15px;
        height: 189px;
        background-color: #fff
    }
 
    .contantBox .iconBox {
        position: absolute;
        left: 53px;
        top: 35px;
        width: 100px;
        height: 110px;
        padding-top: 12px;
        background-color: #fff;
        z-index: 11
    }
 
    .contantBox .iconBox .circleBox {
        width: 80px;
        height: 80px;
        line-height: 80px;
        background: url('https://hovertree.com/texiao/css3/32/images/hovertree1.fjxivxxxxbqxvxxxxxxxxxx-80-80.png') 0 0 no-repeat;
        text-align: center;
        color: #359EFB;
        font-size: 28px;
    }
 
    .contantBox .iconBox .iconfont {
        font-size: 32px;
        color: #00a0ff
    }
 
    .contantBox .pictureBox {
        position: absolute;
        right: -8px;
        bottom: -3px;
        width: 0;
        height: 16px;
        background-color: #fff;
        overflow: hidden
    }
 
    .contantBox .pictureBox .circleBox {
        float: right;
        width: 17px;
        height: 16px;
        background: url('https://hovertree.com/texiao/css3/32/images/hovertree15pjohvxxxxcaxpxxxxxxxxxx-16-16.png') 0 0 no-repeat
    }
 
    .contantBox .bigBox:hover .textBox {
        color: #00a0ff
    }
 
    .contantBox .bigBox:hover .bomBox {
        animation: borderslideBottom .15s linear 0s 1;
        animation-fill-mode: forwards
    }
 
    .contantBox .bigBox:hover .leftBox {
        animation: bordersildeLeft .2s linear .15s 1;
        animation-fill-mode: forwards
    }
 
    .contantBox .bigBox:hover .topBox {
        animation: bordersildeTop .15s linear .35s 1;
        animation-fill-mode: forwards
    }
 
    .contantBox .bigBox:hover .rightBox {
        animation: bordersildeRight .2s linear .5s 1;
        animation-fill-mode: forwards
    }
 
    .contantBox .bigBox:hover .pictureBox {
        animation: bordersildeEnd .1s linear .7s 1;
        animation-fill-mode: forwards
    }
 
 
    @-moz-keyframes borderslideBottom {
        from {
            width: 295px
        }
 
        to {
            width: 0
        }
    }
 
    @-webkit-keyframes borderslideBottom {
        from {
            width: 295px
        }
 
        to {
            width: 0
        }
    }
 
    @keyframes borderslideBottom {
        from {
            width: 295px
        }
 
        to {
            width: 0
        }
    }
 
    @-moz-keyframes bordersildeLeft {
        from {
            height: 189px
        }
 
        to {
            height: 0
        }
    }
 
    @-webkit-keyframes bordersildeLeft {
        from {
            height: 189px
        }
 
        to {
            height: 0
        }
    }
 
    @keyframes bordersildeLeft {
        from {
            height: 189px
        }
 
        to {
            height: 0
        }
    }
 
    @-moz-keyframes bordersildeTop {
        from {
            width: 295px
        }
 
        to {
            width: 0
        }
    }
 
    @-webkit-keyframes bordersildeTop {
        from {
            width: 295px
        }
 
        to {
            width: 0
        }
    }
 
    @keyframes bordersildeTop {
        from {
            width: 295px
        }
 
        to {
            width: 0
        }
    }
 
    @-moz-keyframes bordersildeRight {
        from {
            height: 189px
        }
 
        to {
            height: 0
        }
    }
 
    @-webkit-keyframes bordersildeRight {
        from {
            height: 189px
        }
 
        to {
            height: 0
        }
    }
 
    @keyframes bordersildeRight {
        from {
            height: 189px
        }
 
        to {
            height: 0
        }
    }
 
    @-moz-keyframes bordersildeEnd {
        from {
            width: 0
        }
 
        to {
            width: 34px
        }
    }
 
    @-webkit-keyframes bordersildeEnd {
        from {
            width: 0
        }
 
        to {
            width: 34px
        }
    }
 
    @keyframes bordersildeEnd {
        from {
            width: 0
        }
 
        to {
            width: 34px
        }
    }
</style>

到此这篇关于css3鼠标滑过实现动画线条边框的文章就介绍到这了

分享到:

相关信息

  • css圆角三角形的实现代码

    今天给大家带来一个如何实现圆角三角形的方案,这个方案虽然可以实现,但是也是借助拼凑等方式来实现的,假如想一个div来实现圆角三角形,还是比较困难的。之前文章讲了如何实现对话框,里面介绍了三角形的实现方式。今天讲讲...

    2023-03-06

  • CSS 弹性布局Flex详细讲解(Flex 属性详解、场景分析)

    Flex 简介 Flex 容器属性 Flex 基本使用 场景一 flex-direction 场景二 justify-content align-items flex-wrap...

    2023-03-06

系统教程栏目

栏目热门教程

人气教程排行

站长推荐

热门系统下载