实现效果:
代码如下:
<!DOCTYPE html>
<html>
<head>
<title>无标题页</title>
<style>
body{
background-color: darkgrey;
}
.raida{
display:flex;
height: 500px;
width: 500px;
text-align: center;
justify-content: center;
align-items: center;
}
.raidal2 {
height: 100px;
width: 10px;
text-align: center;
background:radial-gradient(20px at center left,transparent 50%,white 50%);
}
.raidal3 {
height: 100px;
width: 280px;
color:red;
text-align:center;
background:radial-gradient(20px at center right,transparent 50%, aquamarine 50%);
display: flex;
}
.right{
flex: 5;
background-color: white;
display: flex;
flex-direction: column;
}
.title{
color: aqua;
text-align: center;
}
img{
width: 100px;
height: 75px;
}
.left{
text-align: center;
margin-right: 10px;
flex: 3;
display: flex;
flex-direction: column;
background-color: aquamarine;
}
</style>
</head>
<body>
<div class='raida'>
<div class='raidal2'></div>
<div class='raidal3'>
<div class="right">
<div class="title">优惠卷</div>
<div><img src="img/goods.jpeg"/></div>
</div>
<div class="left">
<div>¥<text style="font-weight: bolder;font-size: 25px;">30</text></div>
<div><text style="font-size: 11px;">满79元可用</text></div>
<div><text style="font-size: 13px;">立即使用</text></div>
</div>
</div>
</div>
</body>
</html>
参考:https://blog.youkuaiyun.com/echozly/article/details/122210055