<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>css画的添加和删除</title>
<style>
body {
background-color: #144756;
}
button {
position: absolute;
width: 60px;
padding: 2px;
height: 60px;
border-radius: 50%;
font-size: 60px;
background-color: rgb(255, 0, 0);
background-image: linear-gradient(to top left,
rgba(0, 0, 0, 0.2),
rgba(0, 0, 0, 0.2) 30%,
rgba(0, 0, 0, 0));
box-shadow: inset 4px 4px 4px rgba(255, 255, 255, 0.6),
inset -4px -4px 5px rgba(0, 0, 0, 0.6);
border: 0px solid black;
}
.add {
top: 10px;
left: 169px;
.plus {
display: block;
width: 100%;
height: 100%;
background: linear-gradient(#fff, #fff), linear-gradient(#fff, #fff);
background-size: 50% 2px, 2px 50%;
background-position: center;
background-repeat: no-repeat;
}
}
.delete {
top: 10px;
left: 269px;
.minus {
display: block;
width: 100%;
height: 100%;
background: linear-gradient(45deg, transparent 48%, #fff 48%, #fff 52%, transparent 52%),
linear-gradient(-45deg, transparent 48%, #fff 48%, #fff 52%, transparent 52%);
background-size: 55% 25px, 25px 54%;
background-position: center;
background-repeat: no-repeat;
}
}
</style>
</head>
<body>
<button class="add"> <i class="plus"></i></button>
<button class="delete"> <i class="minus"></i></button>
</body>
</html>
02-08
607
01-17
956
04-18
5683
04-05
6777
11-15
168
06-02
6497