<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
div {
position:relative;
top: 100px;
left: 50%;
width: 100px;
height: 100px;
background-color: tomato;
}
div:before {
content: "";
position:absolute;
top: -50px;
left: 0;
width: 100px;
height: 100px;
border-radius: 50%;
background-color: blue;
}
div:after{
content: "";
position: absolute;
top: 0px;
left: 50px;
width: 100px;
height: 100px;
background-color: yellow;
border-radius: 50%;
}
div:before {
background-color: tomato;
}
div:after{
background-color: tomato;
}
div {
position:relative;
top: 100px;
left: 50%;
width: 100px;
height: 100px;
background-color: tomato;
transform: rotate(-45deg);
}
.main{
position: relative;
width: 100px;
height: 100px;
float: left;
}
</style>
</head>
<body>
<h1>love无处不在...</h1>
<div class="main"></div>
<div class="main"></div>
<script></script>
</body>
</html>