Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 是否可以在某些元素上设置新的根大小,而不是<;html>?(雷姆)_Css_Pixel_Font Size_Css Rem - Fatal编程技术网

Css 是否可以在某些元素上设置新的根大小,而不是<;html>?(雷姆)

Css 是否可以在某些元素上设置新的根大小,而不是<;html>?(雷姆),css,pixel,font-size,css-rem,Css,Pixel,Font Size,Css Rem,我的问题是: <html style="font-size:62.5%"> <!-- This and all children, 1rem = 10px --> <div class="helloworld-framework" style="font-size:16px;"> <!-- This and all children, 1rem = 16px --> </div> </html> I

我的问题是:

<html style="font-size:62.5%">
<!-- This and all children, 1rem = 10px -->
   <div class="helloworld-framework" style="font-size:16px;">
      <!-- This and all children, 1rem = 16px -->
   </div>
</html>
Im使用CSS框架,使用
rem
作为单位。一些网站/模板将其
字体大小设置为
html{font size:62.5%}
,因此1rem是10px而不是16px那么使用该框架的所有文本/元素都很小

我尽量不改变他们的根字体大小,如果可能的话


所以问题是:我可以为某个元素设置一个新的根大小吗?(可能吗?)

类似于:

<html style="font-size:62.5%">
<!-- This and all children, 1rem = 10px -->
   <div class="helloworld-framework" style="font-size:16px;">
      <!-- This and all children, 1rem = 16px -->
   </div>
</html>


否,但您可以将html元素的字体大小重置为框架中用户的首选项…否,但您可以将html元素的字体大小重置为框架中用户的首选项。。。