feat: center img and iframe

This commit is contained in:
KazooTTT
2025-02-07 17:24:01 +08:00
parent 84730146a6
commit 0defa34797

View File

@ -121,3 +121,21 @@ const socialImageURL = new URL(ogImage ? ogImage : "/social-card.png", Astro.url
</script> </script>
<meta content={Astro.generator} name="generator" /> <meta content={Astro.generator} name="generator" />
<style is:global>
html,
body {
width: 100%;
}
/* 确保所有图片不会溢出容器 */
img {
margin-left: auto;
margin-right: auto;
max-width: 100%;
}
iframe {
margin-left: auto;
margin-right: auto;
max-width: 100%;
}
</style>