-
Notifications
You must be signed in to change notification settings - Fork 193
/
Copy pathcss-mask.html
47 lines (43 loc) · 1.44 KB
/
css-mask.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>css-mask</title>
<style>
div {
position: relative;
width: 874px;
height: 437px;
border-radius: 6px;
/* Permalink - use to edit and share this gradient: https://colorzilla.com/gradient-editor/#f3c5bd+0,ff6600+53,c72200+100 */
background: #f3c5bd;
/* Old browsers */
background: -moz-linear-gradient(left, #f3c5bd 0%, #ff6600 53%, #c72200 100%);
/* FF3.6-15 */
background: -webkit-linear-gradient(left, #f3c5bd 0%, #ff6600 53%, #c72200 100%);
/* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to right, #f3c5bd 0%, #ff6600 53%, #c72200 100%);
/* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3c5bd', endColorstr='#c72200', GradientType=1);
/* IE6-9 */
-webkit-mask: url(https://img.alicdn.com/tfs/TB1wsrFdjMZ7e4jSZFOXXX7epXa-874-437.png) no-repeat top right;
mask: url(https://img.alicdn.com/tfs/TB1wsrFdjMZ7e4jSZFOXXX7epXa-874-437.png) no-repeat top right;
-webkit-mask-size: cover;
mask-size: cover;
}
div~div {
width: 500px;
height: 400px;
}
</style>
</head>
<body>
<div>试试</div>
<br>
<br>
<br>
<div>试试</div>
</body>
</html>