clip-path

 

<style type="text/css">
.wrap {
background-color: #eee;
width: 375px;
margin: 0 auto;
padding: 10px;
box-sizing: border-box;
background: linear-gradient(#cdd9fe, #e2e9fd);
position: relative;
}

.tabs {
display: flex;
justify-content: space-between;
width: 100%;
overflow: hidden;
border-radius: 8px 8px 0 0;
}
.wrap .btn {
width: 130px;
height: 90px;
background: pink;
text-align: center;
line-height: 50px;
border-radius: 20px 20px 0px 0px;
position: absolute;
right: 10px;
top: 10px;
z-index: 0;
}
.tab {
flex: 0 0 200px;
height: 50px;
cursor: pointer;
position: relative;
text-align: center;
line-height: 50px;
}

.tab.active {
background-color: #fff;
color: #4185ef;
}

.tab.active:after {
content: "";
position: absolute;
top: 0;
right: -50px;
height: 100%;
width: 50px;
z-index: 2;
background-color: #fff;
clip-path: path("M 0,0 C 25,0 25,50 50,50 L 0, 50 Z");
}

.content-wrap {
min-height: 200px;
background: #fff;
border-radius: 0px 20px 0px 0px;
position: relative;
z-index: 1;
}
</style>
<div class="wrap">
    <div class="tabs">
        <div class="tab active">标签1</div>
        <div class="btn">福利</div>
    </div>
    <div class="content-wrap"></div>
</div>

 

posted @ 2024-02-29 15:47  石头记1  阅读(9)  评论(0)    收藏  举报