用em定义字体大小时,我的H3被用户代理样式表覆盖。当我使用像素它很好,它的em没有响应:
* {margin:0;}
body{
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
background-color: #f8f8f8;
color: #636363;
margin: 0px;
}
p{margin: 15px 0; line-height:20px;}
h1, h2, h3, h4, h5, h6 { font-family: Arial, Helvetica, sans-serif; }
h1 { font-size: 3.929 em }
h2 { font-size: 2.072 em; text-transform: uppercase; }
h3 { font-size: 2.072 em; padding: 10px 0;}
h1和h2工作正常。任何人都可以帮助我吗?
感谢
答案 0 :(得分:0)
h1 { font-size: 3.929 em }
h2 { font-size: 2.072 em; text-transform: uppercase; }
h3 { font-size: 2.072 em; padding: 10px 0;}
取走数字与'em'之间的空格
h1 { font-size: 3.929em }
h2 { font-size: 2.072em; text-transform: uppercase; }
h3 { font-size: 2.072em; padding: 10px 0;}