Skip to content

Commit 440874d

Browse files
committed
完成了评论功能和一部分响应式设计(基本完成所有任务)
1 parent a71d4ec commit 440874d

File tree

3 files changed

+575
-335
lines changed

3 files changed

+575
-335
lines changed

Diff for: css/video.css

+37-5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
justify-content: center;
1111
flex-direction: row;
1212
align-items: end;
13+
outline: none;
1314
}
1415

1516
.swiper-bgc {
@@ -48,6 +49,7 @@
4849
flex-direction: column;
4950
justify-content: center;
5051
align-items: center;
52+
user-select: none;
5153
}
5254

5355
.video-btn-avatar {
@@ -125,6 +127,7 @@
125127
}
126128

127129

130+
128131
.video-btn-item:hover {
129132
svg {
130133
/* animation: 动画名 持续时长 关键帧持续方式 forwards代表保留变化到100%时的状态 */
@@ -135,12 +138,13 @@
135138

136139
.video-main-interface {
137140
display: flex;
141+
height: 100%;
138142
width: 100%;
139143
flex-direction: column;
140144
}
141145

142146
.video-tog {
143-
height: 704px;
147+
height: 94%;
144148
display: flex;
145149
justify-content: center;
146150
align-items: center;
@@ -271,9 +275,15 @@
271275

272276
.comments-users {
273277
width: 100%;
278+
height: 570px;
274279
display: flex;
275280
flex-direction: column;
276281
margin-top: 8px;
282+
overflow-y: scroll;
283+
284+
/* 修改滑块样式 */
285+
scrollbar-width: thin;
286+
scrollbar-color: rgba(124, 124, 124, 0.605) rgba(0, 0, 0, 0);
277287
}
278288

279289
.comments-user {
@@ -322,6 +332,7 @@
322332
.user-operates {
323333
display: flex;
324334
flex-direction: row;
335+
user-select: none;
325336
}
326337

327338
.user-operate {
@@ -351,8 +362,8 @@
351362
}
352363

353364
.video-con {
354-
width: 1430px;
355-
height: 750px;
365+
width: 86%;
366+
height: 90%;
356367
top: 70px;
357368
left: 160px;
358369
position: absolute;
@@ -362,10 +373,12 @@
362373
border-radius: 15px;
363374
}
364375

376+
377+
365378
.control {
366379
width: 100%;
367380
bottom: 0;
368-
height: 48px;
381+
height: 6%;
369382
display: flex;
370383
flex-direction: column;
371384
border-radius: 0 0 15px 15px;
@@ -462,7 +475,7 @@
462475
}
463476

464477
.control-set {
465-
height: 44px;
478+
height: 100%;
466479
width: 100%;
467480
background-color: rgba(0, 0, 0, 0.112);
468481
border-radius: 0 0 15px 15px;
@@ -835,4 +848,23 @@
835848
svg:hover path {
836849
fill: white;
837850
}
851+
}
852+
853+
854+
/* 媒体样式应该放在所有样式之后 */
855+
@media screen and (max-width:1100px) {
856+
857+
.btn-text-con,
858+
.text-con-qual,
859+
.text-con-speed {
860+
display: none;
861+
}
862+
863+
}
864+
865+
@media screen and (max-width:1500px) {
866+
.video-tog video {
867+
height: auto;
868+
width: 100%;
869+
}
838870
}

Diff for: data/video-data.js

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export const videos = [
3131
},
3232
]
3333

34+
3435
export function togVoice() {
3536

3637
const voice = document.querySelectorAll('.volume-con')

0 commit comments

Comments
 (0)