[HTML] 纯文本查看 复制代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
.basketball {
transform-style: preserve-3d;
position: relative;
width: 100px;
height: 100px;
background-color: orangered;
border: 4px solid #000;
border-radius: 50%;
overflow: hidden;
}
.ring {
position: absolute;
width: 60px;
height: 60px;
background-color: transparent;
border: 4px solid #000;
border-radius: 50%;
}
.ring-left {
left: -30px;
top: 16px;
}
.ring-right {
right: -30px;
top: 16px;
}
.line {
position: absolute;
top: 0;
left: 50%;
margin-left: -2px;
width: 4px;
height: 100px;
background-color: #000;
}
.line-horizon {
transform: rotate(90deg);
}
/* .shadow {
width: 50px;
height: 50px;
border-radius: 50%;
} */
</style>
</head>
<body>
<div class="basketball">
<div class="ring ring-left"></div>
<div class="ring ring-right"></div>
<div class="line line-vertical"></div>
<div class="line line-horizon"></div>
<!-- <div class="shadow"></div> -->
</div>
</body>
</html>