-
Notifications
You must be signed in to change notification settings - Fork 0
/
a.html
41 lines (34 loc) · 958 Bytes
/
a.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
<!doctype html>
<style>
div::after {
width: 100px;
height: 100px;
border: 2px solid;
display: block;
}
/* 10x10 red square */
.png::after {
content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mP8z8AARIQB46hC+ioEAGX8E/cKr6qsAAAAAElFTkSuQmCC);
}
.linear::after {
content: linear-gradient(to bottom, #00abeb, #fff 50%, #66cc00 50%, #fff);
}
.linear-background::after {
content: '';
background-image: linear-gradient(to bottom, #00abeb, #fff 50%, #66cc00 50%, #fff);
}
.svg::after {
content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="green" /></svg>');
}
div {
margin-bottom: 10px;
}
</style>
content: url(10x10-red.png)
<div class="png"></div>
content: linear-gradient
<div class="linear"></div>
background: linear-gradient
<div class="linear-background"></div>
content: url(svg with no size or aspect ratio)
<div class="svg"></div>