我创建了一个网站,我想要标题 <h1>
调整它们的大小以及 <header>
的宽度.我用了 vw
为此的属性(property)。但是该属性在 Firefox 中不起作用,因为那里显示的字体大小非常小。
你可以在这个 fiddle 中明白我的意思。如果你在 firefox 中运行这个 fiddle ,你会看到小字体。
Body {
background: white;
font-family: "Myriad Pro";
size: 12px;
color: #323232;
}
header {
position: relative;
width: auto;
height: auto;
max-height: 239px;
min-height: inherit;
background: #d1d2d4;
overflow: hidden;
}
header h1 {
font-family: "Arial";
font-size-adjust: 0.10;
font-size: 5vw;
color: black;
position: absolute;
left: 13.5%;
top: 25%;
}
header p {
font-family: "Myriad Pro";
font-size-adjust: 0.10;
font-size: 2vw;
color: #404041;
position: absolute;
left: 13.5%;
top: 64%;
letter-spacing: 2pt;
}
<header>
<img src="images/Logo.png" style="margin-left:2.5%; margin-top:2.5%; width:10%; height:inherit;" />
<h1 style="">Website®</h1>
<p>Welcome To My Website!</p>
<img src="http://tinyurl.com/ku6cgpy" style="align: right; float:right; width:40%; height:auto; overflow-style:auto; overflow:visible;" />
</header>
谁能告诉我我做错了什么?
最佳答案
从你的 css 中移除 font-size-adjust: 0.1
这里是 Fiddle
关于html - Firefox 中的字体非常小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29863375/