-
Notifications
You must be signed in to change notification settings - Fork 0
/
text-decorate.html
55 lines (49 loc) · 1.34 KB
/
text-decorate.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
height: 100vh;
position: relative;
}
.container{
position: relative;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: whitesmoke;
}
.container h2{
font-size: 8rem;
background: linear-gradient(90deg,red,orange,blue,purple,green,yellow);
background-clip: text;
color:transparent;
z-index: 9;
}
.container h2::before{
content: 'HELLO WORLD';
position: absolute;
font-size: 8rem;
background: linear-gradient(90deg,red,orange,blue,purple,green,yellow);
background-clip: text;
color:white;
translate:-12px -12px;
z-index: -99;
}
</style>
</head>
<body>
<div class="container">
<h2 --data-text="HELLO WORLD">HELLO WORLD</h2>
</div>
</body>
</html>