Skip to content
0

保持首页卡片高度一致

保持首页卡片高度一致

环境

Teek@1.5.0-2025.9.23 版本上测试

自己的开源库《vitepress-theme-teek-one》 --(克隆自 作者Teeker的文档风开源库《vitepress-theme-teek-docs-template》)

2025年9月26日测试

需求

当前卡片的高度是不一致的。

image-20250926211928575

配置

编辑docs\.vitepress\theme\style\var.scss文件:

scss
// --------------------------------------------------------------------------
// 保持首页卡片高度一致
.tk-post-item-card__cover-img .cover-img {
  cursor: pointer;
  height: 190px;
  -o-object-fit: cover;
  object-fit: cover;
  transition: transform .4s linear;
  width: 100%;
}
// --------------------------------------------------------------------------

验证:(OK了😜)

image-20250926212630387

结束。

最近更新