-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhalfCharacterColor.html
57 lines (50 loc) · 928 Bytes
/
halfCharacterColor.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
56
<!DOCTYPE html>
<html>
<head>
<style>
body{
background:grey;
}
.half-colors {
padding:0px;
position:relative;
margin-top:300px;
left:50%;
font-size:80px;
display:inline-block;
color:#EE2436;
font-family: 'Chilanka', cursive;
z-index:1;
}
.half-colors:after{
content: attr(attribute);
color:#FAE140;
position:absolute;
top:0;
left:0;
width:60%;
overflow:hidden;
z-index:2;
}
.half-colors:before{
content: attr(attribute);
color:black;
position:absolute;
top:0;
left:0;
width:28%;
overflow:hidden;
z-index:3;
}
</style>
</head>
<body>
<span class="half-colors" attribute="B">B</span>
<span class="half-colors" attribute="E">E</span>
<span class="half-colors" attribute="L">L</span>
<span class="half-colors" attribute="G">G</span>
<span class="half-colors" attribute="I">I</span>
<span class="half-colors" attribute="U">U</span>
<span class="half-colors" attribute="M">M</span>
</body>
</html>