-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparallelograms.html
More file actions
49 lines (49 loc) · 994 Bytes
/
parallelograms.html
File metadata and controls
49 lines (49 loc) · 994 Bytes
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>parallelograms</title>
<style>
body{
margin: 0;
padding: 0;
}
div{
width: 300px;
height: 200px;
margin: 50px auto;
}
p{
color: white;
text-align: center;
line-height: 200px;
}
.pl{
background: #58a;
transform: skewX(-30deg);
}
.pl > p{
transform: skewX(30deg);
}
.pl-pseudo{
position: relative;
}
.pl-pseudo::before{
content: '';
position: absolute;
top: 0; right: 0; bottom: 0; left: 0;
z-index: -1;
background: #58a;
transform: skew(-30deg);
}
</style>
</head>
<body>
<div class="pl">
<p>CLICK ME</p>
</div>
<div class="pl-pseudo">
<p>CLICK ME</p>
</div>
</body>
</html>