CSS 角標選中、右下角選中效果
阿新 • • 發佈:2021-01-19
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>角標選中</title>
<style>
.box {
width: 100px;
height: 100px;
position: relative;
}
.selected {
color: #4ABE84;
box-shadow:0 2px 7px 0 rgba(85,110,97,0.35);
border-radius:7px;
border:1px solid rgba(74,190,132,1);
}
.selected:before {
content: '';
position: absolute;
right: 0;
bottom: 0;
border : 17px solid #4ABE84;
border-top-color: transparent;
border-left-color: transparent;
}
.selected:after {
content: '';
width: 5px;
height: 12px;
position: absolute;
right: 6px;
bottom: 6px;
border: 2px solid #fff;
border-top-color: transparent;
border-left-color: transparent;
transform: rotate(45deg);
}
</style>
</head>
<body>
<div class="box selected"></div>
</body>
</html>