修复 register-advert padding 导致的高度错位问题
All checks were successful
continuous-integration/drone/push Build is passing

- 移除 #index .register-advert 的 padding: 40px 0
- 设置 padding: 0 和 height: auto 让容器自适应
- 图片使用 height: auto 和 object-fit: contain
- 移除 common.css 中的固定高度限制

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
yiqiu
2025-11-24 13:05:14 +08:00
parent 47ec5d582e
commit 7a2a78f190
2 changed files with 8 additions and 6 deletions

View File

@@ -304,9 +304,7 @@
.register-advert {
width: 100%;
height: 75px;
background: linear-gradient(90deg, #EF4C1D 0%, #F41A10 100%);
overflow: hidden;
/* background-image: url(../assets/img/index/register@2x.png);
background-repeat: no-repeat;
background-size: cover; */
@@ -315,14 +313,11 @@
.register-advert a {
display: block;
width: 100%;
height: 100%;
text-align: center;
}
.register-advert a img {
width: 100%;
height: 75px;
object-fit: cover;
display: block;
margin: 0 auto;
}

View File

@@ -2261,13 +2261,20 @@ html {
/* 注册广告优化 */
#index .register-advert {
background: transparent;
padding: 40px 0;
padding: 0;
height: auto;
}
#index .register-advert a {
display: block;
}
#index .register-advert img {
border-radius: 16px;
box-shadow: 0 8px 32px rgba(56, 189, 248, 0.2);
transition: all 0.3s ease;
height: auto;
object-fit: contain;
}
#index .register-advert img:hover {