对我来说,它可以覆盖“sans”,因为默认情况下使用的是sans。
我找到了一个解决方案,可以根据所选的语言环境使用tailwind来更改font-family。在global.css文件中,我添...
对我来说,它可以覆盖“sans”,因为默认情况下使用的是sans。
Font Families By default Tailwind provides three font family utilities: a cross-browser sans-serif stack, a cross-browser serif stack, and a cross-browser monospaced stack. You can change, add, or remove these by editing thetheme.fontFamilysection of your Tailwind config. ...
<pclass="font-['Open_Sans']"><!-- ... --></p> Learn more about arbitrary value support in thearbitrary valuesdocumentation. Customizing the default font For convenience,Preflightsets the font family on thehtmlelement to match your configuredsansfont, so one way to change the default...
字体:font-[family] <div class="font-sans">Font Sans</div> <div class="font-serif">Font Serif</div> <div class="font-mono">Font Mono</div> 自定义字体族配置 <head> <!-- ... -->> <script> tailwind.config = { theme: { fontFamily: { sans: ["Inter", "sans-serif"], serif...
fontFamily The font-family utilities like font-serif fontSize The font-size utilities like text-3xl fontSmoothing The font-smoothing utilities like antialiased fontStyle The font-style utilities like italic fontVariantNumeric The font-variant-numeric utilities like oldstyle-nums fontWeight The font-we...
如果你想覆盖tailwind的默认字体,默认情况下,tailwind对所有的东西都使用sans样式,这相当于font-sans类...
<div class="font-mono">Font Mono</div> 自定义字体族配置 <head> <!-- ... -->> <script> tailwind.config = { theme: { fontFamily: { sans: ["Inter","sans-serif"], serif: ["Inter","serif"], mono: ["Inter","monospace"] ...
<div class="font-mono">Font Mono</div> 自定义字体族配置 <head> <!-- ... -->> <script> tailwind.config = { theme: { fontFamily: { sans: ["Inter","sans-serif"], serif: ["Inter","serif"], mono: ["Inter","monospace"] ...