完成前端界面和后端的链接

master
Gary 3 weeks ago
parent 68af11c8b6
commit 36a9e661ae

@ -13,7 +13,7 @@
</view>
<!-- 内容 -->
<!-- 如果要显示过渡动画 在下面添加如下部分 v-show="!showNBA && !showLogo && !showSignature" -->
<view class="content" :style="{ minHeight: '100vh' }">
<view class="content" :style="{ minHeight: '100vh' }" v-show="!showNBA && !showLogo && !showSignature" >
<!-- 顶部Logo部分 -->
<view class="top_logo">
<image src="@/static/transition/nba.png" class="top_logo_nba"></image>
@ -32,6 +32,19 @@
<view class="event_content">
<text class="event_text">{{currentEvent}}</text>
</view>
<!-- &lt;!&ndash; 添加按钮容器 &ndash;&gt;
<view class="event_buttons">
<button
class="event_btn send_btn"
@click="simulate_the_flow_of_the_competition"
hover-class="button-hover"
>模拟比赛流程</button>
<button
class="event_btn retry_btn"
@click="retryConnection"
hover-class="button-hover"
>重试</button>
</view>-->
</view>
<!-- 湖人队进攻动画部分 -->
@ -119,7 +132,7 @@
</view>
</view>
<!-- 过渡线 -->
<image src="@/static/content/line/line.png" class="line3"></image>
<image src="@/static/content/line/line.png" class="line3" v-show="!showNBA && !showLogo && !showSignature" ></image>
@ -316,8 +329,8 @@ export default {
nbaDuration: 2000, // NBA
logoDuration: 2000, // Logo
signatureDuration: 2000, //
is_wolf_attack: true,
is_laker_attack: true,
is_wolf_attack: false,
is_laker_attack: false,
showNBA: true, // NBA true
showLogo: false, // Logo
showSignature: false, //
@ -325,10 +338,10 @@ export default {
now_class: "4", //
now_minute: "8", //
now_seconds: "23", //
laker_score: 57, //
wolf_score: 58, //
three_point_shot_laker: 38, //
two_point_shot_laker: 1, // 2
laker_score: 34, //
wolf_score: 53, //
three_point_shot_laker: 12, //
two_point_shot_laker: 21, // 2
three_point_shot_wolf: 38, //
@ -654,7 +667,7 @@ export default {
points: '3'
}
],
currentEvent: "爱德华兹 三分投篮命中 (3分) (朱利叶斯-兰德尔 2次助攻)", //
currentEvent: "欢迎进入体育直播可视化系统!", //
};
},
onReady() {
@ -662,17 +675,56 @@ export default {
this.getServerData_laker_score();
this.getServerData_laker_tech();
this.getServerData_wolf_tech();
uni.connectSocket({
url: 'ws://localhost:9090/exercise',
success: () => {
console.log('WebSocket连接成功');
},
fail: (err) => {
console.error('WebSocket连接失败', err);
}});
uni.onSocketOpen(() => {
console.log('WebSocket连接已打开');
uni.sendSocketMessage({
data: '可以发送消息!!!',
})
});
uni.onSocketMessage((res) => {
console.log('收到服务器消息:', res.data);
// JSON
try {
const data = JSON.parse(res.data);
console.log('解析后的数据:', data); //
this.currentEvent = data.action;
this.now_minute = data.leftMinute;
this.now_seconds = data.leftSecond;
this.laker_score = data.lakerScore;
this.wolf_score = data.wolfScore;
this.now_class=data.classNumber;
//
console.log('当前事件:', this.currentEvent);
console.log('剩余分钟:', this.now_minute);
console.log('剩余秒数:', this.now_seconds);
console.log('湖人得分:', this.laker_score);
console.log('森林狼得分:', this.wolf_score);
} catch (e) {
console.error('解析数据时出错:', e);
}
});
uni.onSocketError((err) => {
console.error('WebSocket连接错误', err);
});
uni.onSocketClose(() => {
console.log('WebSocket连接已关闭');
});
},
onLoad() {
uni.connectSocket(
{
url: "ws:// 192.168.12.106:8080/ ws",
complete: (e) => {
console.log("socket :", e);
}
});//websocket
this.transition();
},
methods: {
transition() {
// NBA
@ -755,806 +807,20 @@ export default {
};
this.chartData_laker_tech = JSON.parse(JSON.stringify(res));
}, 500);
}
},
};
</script>
<style>
/* 定义图片渐变消失动画 */
@keyframes fadeOut {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
.background {
position: relative;
background-color: #000; /* 黑色背景 */
height: 530vh; /* 设置高度覆盖视口 */
overflow: hidden;
-ms-overflow-style:none; //Edge
scrollbar-width: none;//
/*过渡界面部分*/
.transition {
position: absolute;
height: 100vh;
width: 100%;
z-index: 1;
.transition_nba {
position: absolute;
height: 40%;
width: 20%;
left: 40%;
top: 30%;
opacity: 1; /* 初始透明度 */
animation: fadeOut 2s ease-out forwards; /* 动画定义 */
}
.transition_logo {
position: absolute;
height: 40%;
width: 30%;
left: 35%;
top: 30%;
opacity: 1; /* 初始透明度 */
animation: fadeOut 2s ease-out forwards; /* 动画定义 */
}
.transition_signature {
position: absolute;
top: 40%;
width: 100%;
text-align: center; /* 居中对齐 */
color: #ffffff; /* 白色文字 */
font-size: 50px; /* 调整字体大小 */
line-height: 1.5; /* 设置行高 */
font-weight: bold; /* 加粗 */
opacity: 1; /* 初始透明度 */
animation: fadeOut 2s ease-out forwards; /* 动画定义 */
.transition_text {
display: block; /* 强制换行 */
margin-bottom: 5px; /* 设置行间距(可选) */
}
}
} /*过渡部分结束*/
/*比赛内容部分*/
.content {
position: relative;
width: 100%;
z-index: 0;
.top_logo {
position: absolute;
width: 100%;
height: 12%;
z-index: 1;
.top_logo_nba {
position: absolute;
height: 80%;
width: 5%;
top: 10%;
margin: 0 auto;
display: block;
}
.top_logo_signature {
position: absolute;
height: 100%;
width: 40%;
left: 30%;
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
color: #ffffff;
font-size: 55px;
line-height: 1.5;
font-weight: bold;
}
.transition_text {
display: block;
margin-bottom: 5px;
}
.top_logo_all_sport {
position: absolute;
height: 89%;
width: 9%;
top: 5%;
left: 89%;
margin: 0 auto;
display: block;
}
}
.line1 {
position: absolute;
width: 90%;
height: 2px;
left: 5%;
top: 14%;
background-color: #ffffff;
z-index: 1;
}
.basketball_match {
position: absolute;
width: 100%;
height: 87%;
top: 13%;
z-index: 1;
.image {
width: 95%;
height: 90%;
left: 2.5%;
top: 4%;
}
.arrow_wolf_attack {
position: absolute;
width: 50%;
height: 20%;
left: 15%;
top: 60%;
z-index: 100;
opacity: 0.7; /* 设置透明度为低 */
}
.wolf_word_area {
position: absolute;
height: 16%;
width: 30%;
left: 25%;
top: 62%;
z-index: 101;
display: flex; /* 使用 flexbox 来控制内容布局 */
justify-content: center; /* 居中对齐 */
align-items: center; /* 垂直居中对齐 */
text-align: center; /* 文字水平居中 */
color: #000000; /* 字体颜色为黑色 */
font-size: 16px; /* 字体大小,适当调整 */
font-weight: bold; /* 加粗字体 */
word-wrap: break-word; /* 自动换行 */
white-space: normal; /* 允许文本换行 */
padding: 5px; /* 可选:添加内边距来增加空间 */
line-height: 1.5; /* 行高,适当调整 */
}
.arrow_laker_attack {
position: absolute;
width: 50%;
height: 20%;
left: 28%;
top: 63%;
z-index: 100;
opacity: 0.7; /* 设置透明度为低 */
}
.laker_word_area{
position: absolute;
height: 16%;
width: 30%;
left: 38%;
top:65%;
z-index: 101;
}
.event_screen {
position: absolute;
width: 40%;
height: 25%;
left: 30%;
top: 6.5%;
background-color: rgba(0, 0, 0, 0.7);
border: 2px solid #4cd964;
border-radius: 10px;
z-index: 99;
display: flex;
flex-direction: column;
padding: 10px;
box-shadow: 0 0 10px rgba(76, 217, 100, 0.5);
}
.event_title {
color: #4cd964;
font-size: 24px;
font-weight: bold;
text-align: center;
margin-bottom: 10px;
border-bottom: 1px solid #4cd964;
padding-bottom: 5px;
}
.event_content {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
overflow-y: auto;
}
.event_text {
color: #ffffff;
font-size: 20px;
text-align: center;
line-height: 1.5;
padding: 0 10px;
}
}
.line2{
position: absolute;
width: 90%;
height: 2px;
left: 5%;
top: 98%;
background-color: #ffffff;
z-index: 1;
}
.score{
position: absolute;
width: 100%;
height: 7%;
top: 100%;
/* border: #4cd964 solid 2px;*/
}
}/*比赛内容部分结束*/
/*比分部分开始*/
.score {
position: relative;
height: 50vh;
.now_time1 {
position: absolute;
height: 10%;
width: 100%;
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
color: #ffffff;
font-size: 55px; /* 设置字体大小 */
line-height: 1.5;
font-weight: bold;
top: 2%; /* 定位在顶部 */
}
.now_time2 {
position: absolute;
height: 10%;
width: 100%;
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
color: #ffffff;
font-size: 40px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
top: 14%;
}
.wolf_score_text{
position: absolute;
height: 14%;
width: 14%;
left: 8%;
top: 27%;
}
.vs{
position: absolute;
height: 60%;
width: 32%;
left: 34%;
top: 28%;
}
.laker_score_text{
position: absolute;
height: 14%;
width: 11%;
right: 10%;
top: 27%;
}
.wolf_score{
position: absolute;
height: 40%;
top: 48%;
left: 10%;
width: 9%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 120px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.laker_score{
position: absolute;
height: 40%;
top: 48%;
right: 10%;
width: 9%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 120px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
}/*比分部分结束*/
/*球队数据开始*/
.team_statics{
position: relative;
height: 150vh;
.cut_off_line{
position: absolute;
height: 100%;
width: 2px;
left: 50%;
}
.statistics1{
position: absolute;
height: 8%;
top: 1%;
right: 5%;
width: 40%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 50px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.statistics2{
position: absolute;
height: 8%;
top: 1%;
left: 5%;
width: 40%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 50px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.three_point_wolf{
position: absolute;
height: 15%;
top: 8%;
left: 1%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.three_point_laker{
position: absolute;
height: 15%;
top: 8%;
right: 28%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.charts-box-score-wolf{
position: absolute;
width: 25%;
height: 28%;
top: 18%;
left: 12%;
}
.charts-box-score-laker{
position: absolute;
width: 25%;
height: 28%;
top: 18%;
right: 12%;
}
.charts-box-tech-wolf{
position: absolute;
width: 25%;
height: 28%;
top: 68%;
left: 12%;
}
.charts-box-tech-laker{
position: absolute;
width: 25%;
height: 28%;
top: 68%;
right: 12%;
}
.two_point_wolf{
position: absolute;
height: 15%;
top: 8%;
left: 28%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.two_point_laker{
position: absolute;
height: 15%;
top: 8%;
right: 1%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.foul_wolf{
position: absolute;
height: 15%;
top: 40%;
left: 1%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.block_wolf{
position: absolute;
height: 15%;
top: 50%;
left: 1%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.rebound_wolf{
position: absolute;
height: 15%;
top: 40%;
left: 28%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.steal_wolf{
position: absolute;
height: 15%;
top: 50%;
left: 28%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.foul_laker{
position: absolute;
height: 15%;
top: 40%;
right: 28%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.block_laker{
position: absolute;
height: 15%;
top: 50%;
right: 28%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.rebound_laker{
position: absolute;
height: 15%;
top: 40%;
right: 1%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.steal_laker{
position: absolute;
height: 15%;
top: 50%;
right: 1%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
}/*球队数据部分结束*/
.line3{
position: absolute;
height: 2px;
width: 90%;
left: 5%;
top: 57%;
}
/*球员数据开始*/
.human_statics{
position: relative;
height: 230vh;
/* border: #4cd964 2px solid;*/
.tech{
position: absolute;
height: 8%;
top: 0%;
left: 35%;
width: 30%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.0;
font-weight: normal;
letter-spacing: 10px;
}
.laker_icon{
position: absolute;
height: 8%;
width: 30%;
top: 5%;
left: 35%;
}
.laker_charts{
position: absolute;
height: 40%;
width: 90%;
top: 13.5%;
left: 5%;
}
.wolf_icon{
position: absolute;
height: 8%;
width: 40%;
top: 53%;
left: 30%;
}
.wolf_charts{
position: absolute;
height: 36%;
width: 90%;
top: 61%;
left: 5%;
}
.player_table {
position: absolute;
width: 95%;
left: 2.5%;
border: #4cd964 2px solid;
background-color: rgba(255, 255, 255, 0.1);
border-radius: 8px;
display: flex;
flex-direction: column;
height: 100%; /* 确保表格容器占满整个高度 */
}
.laker_table {
top: 13.5%;
height: 35%;
}
.wolf_table {
top: 61%;
height: 35%;
}
.table_header {
display: flex;
background-color: rgba(255, 255, 255, 0.2);
padding: 10px 0;
flex: 0 0 auto; /* 表头固定高度 */
}
.table_row {
display: flex;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
padding: 8px 0;
flex: 1; /* 让每一行平均分配剩余空间 */
&:hover {
background-color: rgba(255, 255, 255, 0.05);
}
}
.header_cell, .cell {
flex: 1;
text-align: center;
color: #ffffff;
font-size: 14px;
padding: 0 2px;
white-space: nowrap;
display: flex;
align-items: center; /* 垂直居中 */
justify-content: center; /* 水平居中 */
}
.header_cell:nth-child(1), .cell:nth-child(1) {
flex: 2;
}
.header_cell:nth-child(2), .cell:nth-child(2) {
flex: 0.8;
}
.header_cell:nth-child(3), .cell:nth-child(3) {
flex: 0.8;
simulate_the_flow_of_the_competition(){
uni.sendSocketMessage({
data: '可以开始发送消息'
})
},
retryConnection(){
uni.closeSocket();//socket
this.connectSocket();//websocket
}
.header_cell {
font-weight: bold;
font-size: 16px;
}
/* 让表格内容区域占满剩余空间 */
.table_content {
display: flex;
flex-direction: column;
flex: 1;
overflow-y: auto; /* 如果内容过多则显示滚动条 */
}
}/*球员数据部分结束*/
}
};
</script>
<style>
@import '@/static/css/index.scss';
</style>

@ -0,0 +1,847 @@
/* 定义图片渐变消失动画 */
@keyframes fadeOut {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
.background {
position: relative;
background-color: #000; /* 黑色背景 */
height: 530vh; /* 设置高度覆盖视口 */
overflow: hidden;
-ms-overflow-style:none; //Edge
scrollbar-width: none;//
/*过渡界面部分*/
.transition {
position: absolute;
height: 100vh;
width: 100%;
z-index: 1;
.transition_nba {
position: absolute;
height: 40%;
width: 20%;
left: 40%;
top: 30%;
opacity: 1; /* 初始透明度 */
animation: fadeOut 2s ease-out forwards; /* 动画定义 */
}
.transition_logo {
position: absolute;
height: 40%;
width: 30%;
left: 35%;
top: 30%;
opacity: 1; /* 初始透明度 */
animation: fadeOut 2s ease-out forwards; /* 动画定义 */
}
.transition_signature {
position: absolute;
top: 40%;
width: 100%;
text-align: center; /* 居中对齐 */
color: #ffffff; /* 白色文字 */
font-size: 50px; /* 调整字体大小 */
line-height: 1.5; /* 设置行高 */
font-weight: bold; /* 加粗 */
opacity: 1; /* 初始透明度 */
animation: fadeOut 2s ease-out forwards; /* 动画定义 */
.transition_text {
display: block; /* 强制换行 */
margin-bottom: 5px; /* 设置行间距(可选) */
}
}
} /*过渡部分结束*/
/*比赛内容部分*/
.content {
position: relative;
width: 100%;
z-index: 0;
.top_logo {
position: absolute;
width: 100%;
height: 12%;
z-index: 1;
.top_logo_nba {
position: absolute;
height: 80%;
width: 5%;
top: 10%;
margin: 0 auto;
display: block;
}
.top_logo_signature {
position: absolute;
height: 100%;
width: 40%;
left: 30%;
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
color: #ffffff;
font-size: 55px;
line-height: 1.5;
font-weight: bold;
}
.transition_text {
display: block;
margin-bottom: 5px;
}
.top_logo_all_sport {
position: absolute;
height: 89%;
width: 9%;
top: 5%;
left: 89%;
margin: 0 auto;
display: block;
}
}
.line1 {
position: absolute;
width: 90%;
height: 2px;
left: 5%;
top: 14%;
background-color: #ffffff;
z-index: 1;
}
.basketball_match {
position: absolute;
width: 100%;
height: 87%;
top: 13%;
z-index: 1;
.image {
width: 95%;
height: 90%;
left: 2.5%;
top: 4%;
}
.arrow_wolf_attack {
position: absolute;
width: 50%;
height: 20%;
left: 15%;
top: 60%;
z-index: 100;
opacity: 0.7; /* 设置透明度为低 */
}
.wolf_word_area {
position: absolute;
height: 16%;
width: 30%;
left: 25%;
top: 62%;
z-index: 101;
display: flex; /* 使用 flexbox 来控制内容布局 */
justify-content: center; /* 居中对齐 */
align-items: center; /* 垂直居中对齐 */
text-align: center; /* 文字水平居中 */
color: #000000; /* 字体颜色为黑色 */
font-size: 16px; /* 字体大小,适当调整 */
font-weight: bold; /* 加粗字体 */
word-wrap: break-word; /* 自动换行 */
white-space: normal; /* 允许文本换行 */
padding: 5px; /* 可选:添加内边距来增加空间 */
line-height: 1.5; /* 行高,适当调整 */
}
.arrow_laker_attack {
position: absolute;
width: 50%;
height: 20%;
left: 28%;
top: 63%;
z-index: 100;
opacity: 0.7; /* 设置透明度为低 */
}
.laker_word_area{
position: absolute;
height: 16%;
width: 30%;
left: 38%;
top:65%;
z-index: 101;
}
.event_screen {
position: absolute;
width: 40%;
height: 25%;
left: 30%;
top: 6.5%;
background-color: rgba(0, 0, 0, 0.7);
border: 2px solid #4cd964;
border-radius: 10px;
z-index: 99;
display: flex;
flex-direction: column;
padding: 10px;
box-shadow: 0 0 10px rgba(76, 217, 100, 0.5);
.event_buttons {
display: flex;
justify-content: space-around;
padding: 10px 0;
margin-top: 10px;
border-top: 1px solid rgba(76, 217, 100, 0.3);
}
.event_btn {
width: 40%;
height: 36px;
line-height: 36px;
text-align: center;
font-size: 14px;
border-radius: 18px;
background: transparent;
border: 1px solid #4cd964;
color: #4cd964;
transition: all 0.2s ease; /* 添加过渡效果 */
/* 移除默认按钮样式 */
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
outline: none;
/* 添加点击效果 */
&:active {
transform: scale(0.95);
opacity: 0.8;
}
}
.send_btn {
background: #4cd964;
color: #000000;
&:active {
background: #45c559;
}
}
.retry_btn {
background: transparent;
color: #4cd964;
&:active {
background: rgba(76, 217, 100, 0.1);
}
}
}
.event_title {
color: #4cd964;
font-size: 24px;
font-weight: bold;
text-align: center;
margin-bottom: 10px;
border-bottom: 1px solid #4cd964;
padding-bottom: 5px;
}
.event_content {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
overflow-y: auto;
}
.event_text {
color: #ffffff;
font-size: 20px;
text-align: center;
line-height: 1.5;
padding: 0 10px;
}
}
.line2{
position: absolute;
width: 90%;
height: 2px;
left: 5%;
top: 98%;
background-color: #ffffff;
z-index: 1;
}
.score{
position: absolute;
width: 100%;
height: 7%;
top: 100%;
/* border: #4cd964 solid 2px;*/
}
}/*比赛内容部分结束*/
/*比分部分开始*/
.score {
position: relative;
height: 50vh;
.now_time1 {
position: absolute;
height: 10%;
width: 100%;
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
color: #ffffff;
font-size: 55px; /* 设置字体大小 */
line-height: 1.5;
font-weight: bold;
top: 2%; /* 定位在顶部 */
}
.now_time2 {
position: absolute;
height: 10%;
width: 100%;
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
color: #ffffff;
font-size: 40px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
top: 14%;
}
.wolf_score_text{
position: absolute;
height: 14%;
width: 14%;
left: 8%;
top: 27%;
}
.vs{
position: absolute;
height: 60%;
width: 32%;
left: 34%;
top: 28%;
}
.laker_score_text{
position: absolute;
height: 14%;
width: 11%;
right: 10%;
top: 27%;
}
.wolf_score{
position: absolute;
height: 40%;
top: 48%;
left: 10%;
width: 9%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 120px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.laker_score{
position: absolute;
height: 40%;
top: 48%;
right: 10%;
width: 9%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 120px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
}/*比分部分结束*/
/*球队数据开始*/
.team_statics{
position: relative;
height: 150vh;
.cut_off_line{
position: absolute;
height: 100%;
width: 2px;
left: 50%;
}
.statistics1{
position: absolute;
height: 8%;
top: 1%;
right: 5%;
width: 40%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 50px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.statistics2{
position: absolute;
height: 8%;
top: 1%;
left: 5%;
width: 40%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 50px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.three_point_wolf{
position: absolute;
height: 15%;
top: 8%;
left: 1%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.three_point_laker{
position: absolute;
height: 15%;
top: 8%;
right: 28%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.charts-box-score-wolf{
position: absolute;
width: 25%;
height: 28%;
top: 18%;
left: 12%;
}
.charts-box-score-laker{
position: absolute;
width: 25%;
height: 28%;
top: 18%;
right: 12%;
}
.charts-box-tech-wolf{
position: absolute;
width: 25%;
height: 28%;
top: 68%;
left: 12%;
}
.charts-box-tech-laker{
position: absolute;
width: 25%;
height: 28%;
top: 68%;
right: 12%;
}
.two_point_wolf{
position: absolute;
height: 15%;
top: 8%;
left: 28%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.two_point_laker{
position: absolute;
height: 15%;
top: 8%;
right: 1%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.foul_wolf{
position: absolute;
height: 15%;
top: 40%;
left: 1%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.block_wolf{
position: absolute;
height: 15%;
top: 50%;
left: 1%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.rebound_wolf{
position: absolute;
height: 15%;
top: 40%;
left: 28%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.steal_wolf{
position: absolute;
height: 15%;
top: 50%;
left: 28%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.foul_laker{
position: absolute;
height: 15%;
top: 40%;
right: 28%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.block_laker{
position: absolute;
height: 15%;
top: 50%;
right: 28%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.rebound_laker{
position: absolute;
height: 15%;
top: 40%;
right: 1%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
.steal_laker{
position: absolute;
height: 15%;
top: 50%;
right: 1%;
width: 22%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.5;
font-weight: normal;
letter-spacing: 20px;
}
}/*球队数据部分结束*/
.line3{
position: absolute;
height: 2px;
width: 90%;
left: 5%;
top: 57%;
}
/*球员数据开始*/
.human_statics{
position: relative;
height: 230vh;
/* border: #4cd964 2px solid;*/
.tech{
position: absolute;
height: 8%;
top: 0%;
left: 35%;
width: 30%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
font-size: 30px; /* 设置字体大小较小 */
line-height: 1.0;
font-weight: normal;
letter-spacing: 10px;
}
.laker_icon{
position: absolute;
height: 8%;
width: 30%;
top: 5%;
left: 35%;
}
.laker_charts{
position: absolute;
height: 40%;
width: 90%;
top: 13.5%;
left: 5%;
}
.wolf_icon{
position: absolute;
height: 8%;
width: 40%;
top: 53%;
left: 30%;
}
.wolf_charts{
position: absolute;
height: 36%;
width: 90%;
top: 61%;
left: 5%;
}
.player_table {
position: absolute;
width: 95%;
left: 2.5%;
border: #4cd964 2px solid;
background-color: rgba(255, 255, 255, 0.1);
border-radius: 8px;
display: flex;
flex-direction: column;
height: 100%; /* 确保表格容器占满整个高度 */
}
.laker_table {
top: 13.5%;
height: 35%;
}
.wolf_table {
top: 61%;
height: 35%;
}
.table_header {
display: flex;
background-color: rgba(255, 255, 255, 0.2);
padding: 10px 0;
flex: 0 0 auto; /* 表头固定高度 */
}
.table_row {
display: flex;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
padding: 8px 0;
flex: 1; /* 让每一行平均分配剩余空间 */
&:hover {
background-color: rgba(255, 255, 255, 0.05);
}
}
.header_cell, .cell {
flex: 1;
text-align: center;
color: #ffffff;
font-size: 14px;
padding: 0 2px;
white-space: nowrap;
display: flex;
align-items: center; /* 垂直居中 */
justify-content: center; /* 水平居中 */
}
.header_cell:nth-child(1), .cell:nth-child(1) {
flex: 2;
}
.header_cell:nth-child(2), .cell:nth-child(2) {
flex: 0.8;
}
.header_cell:nth-child(3), .cell:nth-child(3) {
flex: 0.8;
}
.header_cell {
font-weight: bold;
font-size: 16px;
}
/* 让表格内容区域占满剩余空间 */
.table_content {
display: flex;
flex-direction: column;
flex: 1;
overflow-y: auto; /* 如果内容过多则显示滚动条 */
}
}/*球员数据部分结束*/
}
Loading…
Cancel
Save