-
Notifications
You must be signed in to change notification settings - Fork 0
/
heart.html
48 lines (43 loc) · 906 Bytes
/
heart.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Heart</title>
<style>
/*
Below is flexbox approach to center everything
*/
body {
background-color: #8d8d8d;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto;
height: 100vh;
}
.heart {
position: relative;
height: 160px;
width: 100px;
background: #d16ba5;
border-radius: 200px 200px 0 0;
transform: rotate(45deg);
}
.heart::before {
content: "";
position: absolute;
background: #d16ba5;
height: 160px;
width: 100px;
transform: rotate(-90deg);
border-radius: 200px 200px 0 0;
left: -30px;
top: 30px;
}
</style>
</head>
<body>
<div class="heart"></div>
</body>
</html>