给盒子左上和右下加边框角
<!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>
.box {
width: 320px;
height: 300px;
box-shadow: 0 0 200px 200px rgba(0, 0, 255, 0.1) inset;
position: relative;
}
.box:after {
content: "";
display: block;
width: 20px;
height: 20px;
border-left: 2px solid blue;
border-top: 2px solid blue;
position: absolute;
left: -1px;
top: -1px;
}
.box:before {
content: "";
display: block;
width: 20px;
height: 20px;
border-right: 2px solid blue;
border-bottom: 2px solid blue;
position: absolute;
right: -1px;
bottom: -1px;
}
</style>
</head>
<body>
<div class="box"></div>
</body>
</html>