bootstrap的官网是这样说的,怎么解释?
No base font-size is declared on the <html>, but 16px is assumed (the browser default). font-size: 1rem is applied on the <body> for easy responsive type-scaling via media queries while respecting user preferences and ensuring a more accessible approach.
如果要适配移动端不是要给根元素font-size设置吗?
如果引用bootstrap的css并且自己设置html的font-size,那bootstrap给的公共样式不就不适合了吗?
不是特别明白楼主问题的意思。
如果楼主只是想设定一个通用的字体,可以去less中设定:
找到variables.less文件,将@font-size-base改成18,build一下就能生效了。
官网说的意思简单来说就是:根据不同设备的body中字体的大小给予1rem的大小进行变化,进行响应式的调节。