我正在建立一个基本的网站,我已经得到了很多,但我偶然发现了一个问题:我希望我的所有标题都是字体“Arvo”,但由于某些原因,只有索引页面阿沃在标题。由于我的所有页面都链接到样式表,我应该能够将每个h1更改为该字体。如何更改我的样式表中所有页面上的字体?
这是我的样式表的样子,可能有一些不必要的代码,但我是一个初学者。
body {
background: url("https://www.xmple.com/wallpaper/streaks-lines-red-stripes-1920x1080-c4-7f2a33-972c36-b02c39-cb2b3b-l4-45-72-116-187-a-135-f-1.svg") center center repeat;
margin: 0;
padding: 0;
background-attachment: fixed;
}
#wrap {
width: 54%;
margin: auto;
background: #fff2f9;
overflow: hidden;
padding: 15px;
}
div {
width: 300px;
height: 2000px;
background-color: white;
box-shadow: inset 0 100px 100px #ffffff, 0 10px 15px #000;
}
p {
color: black;
}
h1 {
font-family: 'Arvo', Georgia, Times, serif;
font-size: 59px;
line-height: 70px;
}
p {
font-family: 'PT Sans', Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 25px;
}
b {
font-family: "verdana", sans-serif; color: gold;
text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;
}
a {
font-family: "verdana", sans-serif;
color: black /* unvisited link */
}
/* visited link */
a:visited {
color: black;
}
/* mouse over link */
a:hover {
color: gold;
}
/* selected link */
a:active {
color: black;
}
}
我还需要做什么才能在所有HTML页面上更改字体?
您应该确保所有其他页面都引用相同的样式表。 – jasonwarford