diff --git a/src/components/ArticleContainer.astro b/src/components/ArticleContainer.astro index fea56fd..7af296c 100644 --- a/src/components/ArticleContainer.astro +++ b/src/components/ArticleContainer.astro @@ -58,6 +58,24 @@ const { className = "", dataPagefindBody = true } = Astro.props; text-decoration: none; cursor: pointer; } + + /* 修改图片相关样式 */ + :global(article img) { + opacity: 0; + position: relative; + background-color: #f0f0f0; + transition: all 0.5s ease-in-out; + } + + :global(article img.loading) { + opacity: 1; + filter: blur(10px); + } + + :global(article img.loaded) { + opacity: 1; + filter: blur(0); + }