Skip to content

Commit

Permalink
remove old css
Browse files Browse the repository at this point in the history
  • Loading branch information
wu0407 committed Nov 4, 2024
1 parent ba650e8 commit 2d3c12a
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions assets/css/_partial/_single/_related.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
}

.related-title {
font-size: 1rem;
margin: 0.5rem;
font-size: 0.85rem;
margin: 0.3rem;
overflow: hidden;
}

Expand All @@ -67,10 +67,14 @@

/* 没有图片时的标题样式 */
.related-item-container:not(:has(.related-image)) .related-title {
display: -webkit-box;
-webkit-line-clamp: 3; /* 显示3行 */
-webkit-box-orient: vertical;
max-height: 6.95em; /* 大约3行的高度,根据实际情况调整 */
// display: -webkit-box;
// -webkit-line-clamp: 5; /* 显示5行 */
// -webkit-box-orient: vertical;
// max-height: 7.8em; /* 大约5行的高度,根据实际情况调整 */
display: flex; /* 使用标准的 Flexbox */
flex-direction: column; /* 垂直方向排列 */
overflow: hidden; /* 隐藏超出部分 */
line-height: 1.5em;
}

/* 当没有图片时,确保整个区域可点击 */
Expand Down

0 comments on commit 2d3c12a

Please sign in to comment.