前言


一款發光的 button

開始


以下是範例:

CSS 原始碼


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
.button-1 {
color: white;
background: linear-gradient(45deg, #4eff07, #0ec86b);
box-shadow: 0px 4px 30px rgba(66, 255, 48, 0.4);
}

.button-1:hover {
box-shadow: 0px 7px 30px rgba(0, 1, 2, 0.438);

}

.button-1 {
border: none;
font-family: 'Quicksand', sans-serif;
font-weight: 700;
font-size: 19px;
margin: 15px 35px;
padding: 15px 40px;
min-width: 201px;
border-radius: 50px;
min-height: 55px;
cursor: pointer;
backface-visibility: hidden;
transition: all .3s;
}

.button-1-container {
position: relative;
padding-top: 50px;
padding-bottom: 50px;

}

@keyframes gradient {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}

HTML 原始碼


1
2
3
<div class="button-1-container" align="center">
<a href="/"><button class="button-1">Button</button></a>
</div>