Skip to content

Commit 079dd99

Browse files
committed
fix: 修复幻灯片和文章配图样式
1 parent 8eda283 commit 079dd99

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

assets/css/main.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,18 +201,22 @@ a, a:hover {
201201

202202
/* 幻灯片 */
203203
.carousel-item {
204-
max-height: 17.5rem;
204+
max-height: 25rem;
205205
}
206206

207207
.carousel_link {
208208
color: #fff;
209209
text-decoration: none;
210210
display: inline-block;
211+
width: 100%;
212+
height: 25rem;
213+
overflow: hidden;
211214
}
212215

213216
.carousel_link img {
214217
width: 100%;
215218
height: 100%;
219+
object-fit: cover;
216220
}
217221

218222
.carousel-inner {

component/post.content.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
2-
<section class="article-info <?php if(!$this->fields->banner){echo 'no-cover';}?>"">
2+
<section class="article-info <?php if(!$this->fields->banner){echo 'no-cover';}?>">
33
<?php if($this->fields->banner):?>
44
<div class="article-cover-inner">
55
<img src="<?= $this->fields->banner()?>" alt="cover">

0 commit comments

Comments
 (0)