欢迎来到我的网站
自定义 CSS 样式
-
在 src/styles/custom.css 添加内容如下:
:root {--sl-content-width: 50rem;--sl-text-5xl: 3.5rem;} -
在 astro.config.mjs 中的 customCss 数组中添加你的 CSS 文件的路径:
import { defineConfig } from 'astro/config';import starlight from '@astrojs/starlight';export default defineConfig({integrations: [starlight({title: 'Docs With Custom CSS',customCss: [// 你的自定义 CSS 文件的相对路径'./src/styles/custom.css',],}),],});
可能后期需要学习Tailwind