<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style type="text/css">
* {
padding: 0px;
margin: 0px;
}
.box {
position: relative;
width: 200px;
height: 300px;
background-color: #fff;
margin: 100px auto;
}
.before,
.after {
position: absolute;
left: 0;
top: 0;
width: 200px;
height: 300px;
background-color: red;
transform: rotate(-45deg);
border-radius: 100px 100px 0 0;
color: white;
line-height: 100px;
text-align: center;
font-size: 30px;
}
.after{
transform: rotate(45deg) translateX(50px) translateY(-50px);
}
</style>
</head>
<body>
<div class="box">
<div class="before">义士</div>
<div class="after">憨熊</div>
</div>
</body>
</html>
红心
最新推荐文章于 2022-09-23 18:32:11 发布