<div class="area">
<span>我是一个区域></span>
</div>
.area{
font-size: 20px;
display: inline-block;
background: green;
padding: 20px;
border: 4px;
position: relative;
cursor: pointer;
}
span{
position: relative;
z-index: 1;
}
.area::after{
content: '';
position: absolute;
right: 0;
top: 0;
background-color: yellow;
width: 100%;
height: 100%;
clip-path: circle(0% at 0% 0%);
transition: all 1s ease;
z-index: 0;
}
.area:hover::after{
clip-path: circle(200% at 0% 0%);
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.