css 使用rem进行全局尺寸调整;使用em进行本地大小调整

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css 使用rem进行全局尺寸调整;使用em进行本地大小调整相关的知识,希望对你有一定的参考价值。

article {    
    font-size: 1.25rem;  
}    
aside {    
    font-size: .9rem;  
}

/* Then set the font size for textual elements to em:  */
h2 {    
    font-size: 2em;  
}    
p {    
    font-size: 1em;  
}

/* Now each containing element becomes compartmentalized and easier to style, more maintainable, and flexible.

 */

以上是关于css 使用rem进行全局尺寸调整;使用em进行本地大小调整的主要内容,如果未能解决你的问题,请参考以下文章