forked from QiShaoXuan/css_tricks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
53 lines (53 loc) · 1.24 KB
/
test.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
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Title</title>
</head>
<style>
.mask::before{
content: '';
position: absolute;
top: 0;
left: 0;
bottom: 0;
width: 20px;
background: linear-gradient(to right, #ff6f72 0%, rgba(125, 185, 232, 0) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff6f72', endColorstr='#007db9e8',GradientType=1 );
z-index: 1;
}
.mask::after{
content: '';
position: absolute;
top: 0;
bottom: 0;
right: 0;
width: 20px;
background: linear-gradient(to right, #ff6f72 0%, rgba(125, 185, 232, 0) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff6f72', endColorstr='#007db9e8',GradientType=1 );
z-index: 1;
-webkit-transform: rotate(180deg);
transform: rotate(180deg);
}
.mask{
/*width:200px;*/
font-size: 48px;
line-height: 1;
color:#fff;
position: absolute;
left:0;right:0;
top:0;bottom:0;
margin:auto;
}
body{
background: #ff6f72;
}
</style>
<body>
<div class="mask">
123
</div>
</body>
</html>