Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用LESS有没有一种方法可以设置基本字体大小,然后稍后引用它并输出它说1em得更小?前任:
LESS
1em
@font-size: 3.025em;
然后在媒体查询或其他内容中:
@media only screen and (max-width: 959px) { .box { font-size: @font-size - 1em; } }
我试着用谷歌搜索,但没有想到任何东西。
是的你可以。您必须将基线字体大小设置为LESS无法推断默认值:
然后在媒体查询中:
;)