![节目1]()
-
- 即将开播
-
- {{getDateDay(live.startTime)}} {{ live.startTime.slice(11, 16)}}开播
+
即将开播
+
{{ getDateDay(live.startTime) }} {{ live.startTime.slice(11, 16) }}开播
{{ live.liveName }}
-
+
-
![节目1]()
+
{{ live.user.userName }}
-
预约
+
预约
已预约
@@ -156,6 +150,7 @@ function getDateDay(startTime) {
function booking(liveId, userId) {
alert("预约成功!");
}
+
@@ -186,7 +181,7 @@ function booking(liveId, userId) {
width: 209px;
}
-.card img {
+.card .cover-image img {
width: 100%;
height: 100%;
/*图片占满整个卡片*/
@@ -201,6 +196,31 @@ function booking(liveId, userId) {
border-radius: 8px;
}
+/*即将开播图层*/
+.overlay {
+ position: absolute;
+ z-index: 2;
+ text-align: center;
+ top: 30%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ color: #fff;
+ font-size: 18px;
+}
+
+/*开播时间*/
+.start-time {
+ position: absolute;
+ z-index: 2;
+ text-align: center;
+ top: 60%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ color: #ffffffaf;
+ font-size: 15px;
+ width: 120px;
+}
+
.cover-image::before {
content: " ";
position: absolute;
@@ -212,6 +232,7 @@ function booking(liveId, userId) {
background-color: rgba(0, 0, 0, 0.3);
border-radius: 8px;
}
+
/*用于隐藏样式*/
.cover-image.no-overlay::before {
display: none;