1

当用 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 工作正常。谁能帮我?

谢谢

4

1 回答 1

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;}
于 2013-08-15T14:29:38.163 回答