From 7a2a78f190dc48d1d40959b81cc2ce63b3922b77 Mon Sep 17 00:00:00 2001 From: yiqiu Date: Mon, 24 Nov 2025 13:05:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20register-advert=20padding?= =?UTF-8?q?=20=E5=AF=BC=E8=87=B4=E7=9A=84=E9=AB=98=E5=BA=A6=E9=94=99?= =?UTF-8?q?=E4=BD=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除 #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 --- common/common.css | 5 ----- css/index.css | 9 ++++++++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/common/common.css b/common/common.css index 25b02dd..53c4948 100644 --- a/common/common.css +++ b/common/common.css @@ -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; } diff --git a/css/index.css b/css/index.css index 393cfed..ca7b04d 100644 --- a/css/index.css +++ b/css/index.css @@ -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 {