react实现用户榜单排行榜代码
代码语言:html
所属分类:布局界面
代码描述:react实现用户榜单排行榜代码,金银铜前三甲,下面是滚动的全榜单,还有分数。
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url("https://fonts.googleapis.com/css?family=Amatic+SC");
@import url("https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@300&display=swap");
.list::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
background-color: #F5F5F5;
}
.list::-webkit-scrollbar {
width: 6px;
background-color: #F5F5F5;
}
.list::-webkit-scrollbar-thumb {
background-color: #646464;
}
body {
background-color: #b394c9;
font-family: "Amatic SC";
}
#root {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container {
width: 445px;
height: 600px;
background-color: black;
margin: auto;
font-family: "Amatic SC";
margin: auto;
padding: 1rem;
border-radius: 5px;
box-shadow: 7px 9px 7px #00000052;
}
.container .leader {
display: flex;
}
.container .crown {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.container .crown svg {
width: 3rem;
}
.container .image {
height: 58px;
object-fit: cover;
width: 58px;
background-color: black;
border-radius: 50%;
}
.container .topLeadersList {
display: flex;
position: relative;
min-height: 120px;
padding-top: 3rem;
}
.container .topLeadersList .image {
border-radius: 50%;
border: 3px solid #b159ffcc;
}
.container .topLeadersList .leader:nth-child(1) {
color: black;
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.container .topLeadersList .leader:nth-child(1):after {
content: "1";
width: 30px;
height: 30px;
background: #ffc500;
border-radius: 50%;
position: absolute;
right: 0;
font-family: sans-serif;
text-align: center;
line-height: 30px;
font-weight: 700;
box-shadow: 1px 1px 4px black;
}
.container .topLeadersList .leader:nth-child(1) .image {
width: 130px;
height: 130px;
}
.container .topLeadersList .leader:nth-child(1) .crown {
top: -20%;
}
.container .topLeadersList .leader:nth-child(1) .crown svg {
fill: #ffc500;
}
.container .topLeadersList .leader:nth-child(2) {
color: black;
position: absolute;
left: 15%;
transform: translateX(-15%);
bottom: -20%;
}
.container .topLeadersList .leader:nth-child(2):after {
content: "2";
width: 30px;
height: 30px;
background: #d4d4d4;
border-radius: 50%;
position: absolute;
right: 0;
font-family: sans-serif;
text-align: center;
line-height: 30px;
font-weight: 700;
box-shadow: 1px 1px 4px black;
}
.container .topLeadersList .leader:nth-child(2) .image {
width: 110px;
height: 110px;
}
.container .topLeadersList .leader:nth-child(2) .crown {
top: -25%;
}
.container .topLeadersList .leader:nth-child(2) .crown svg {
fill: #d4d4d4;
}
.container .topLeadersList .leader:nth-child(3) {
color: black;
position: absolute;
left: 85%;
transform: translateX(-85%);
bottom: -20%;
}
.container .topLeadersList .leader:nth-child(3):after {
content: "3";
width: 30px;
height: 30px;
background: #ab6528;
border-radius: 50%;
position: absolute;
right: 0;
font-family: sans-serif;
text-align: center;
line-height: 30px;
font-weight: 700;
box-shadow: 1px 1px 4px black;
}
.container .topLeadersList .leader:nth-child(3) .image {
width: 110px;
height: 110px;
}
.container .topLeadersList .leader:nth-child(3) .crown {
top: -25%;
}
.container .topLeadersList .leader:nth-child(3) .crown svg {
fill: #ab6528;
}
.container .leaderName {
position: absolute;
text-align: center;
color: white;
left: 50%;
transform: translateX(-50%);
font-size: 22px;
}
.container .player {
background-color: #330b7775;
display: grid;
grid-template-columns: 0.4fr 3fr 1fr 1fr 1fr 1fr 1fr 1fr;
align-items: center;
min-height: 42px;
text-align: center;
padding-right: 0.4rem;
}
.container .player .image {
width: 28px;
height: 28px;
border: 1.5px solid white;
}
.container .table {
margin-right: 0.1rem;
display: grid;
font-size: 14px;
grid-template-columns: 0.4fr 3fr 1fr 1fr 1fr 1fr 1fr 1fr;
text-align: center;
}
.container .table div:nth-child(2) {
text-align: left;
margin-left: 5px;
}
.container .table .image {
width: 20px;
height: 20px;
}
.container .playerslist {
margin-top: 6rem;
font-size: 16px;
overflow: hidden;
color:.........完整代码请登录后点击上方下载按钮下载查看
网友评论0