0

我无法显示我的标题字体,我不知道该怎么做。它以前工作过,但我改变了一些东西,它停止工作。出于某种原因,某些事情要么取消,要么将#play id 与其他所有内容断开连接。Section Styles 部分是添加这些字体的地方,也是我尝试进行最大更改以显示字体的地方。但是,到目前为止,没有什么对我有用。我会很感激你的帮助。

  /* Structural Styles */

html {
    background-color: hsl(91, 8%, 56%);
}

body {
    background-color: hsl(58, 31%, 84%);
    font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
}

header {
    background-color: black;
}

p {
    margin: 0px;
    padding-top: 5px;
    padding-right: 25px;
    padding-bottom: 25px;
    padding-left: 25px;
}

body>p {
    font-size: 1.1em;
    text-align: center;
}

address {
    font-style: normal;
    font-size: 0.9em;
    text-align: center;
    padding-top: 10px;
    padding-bottom: 10px;
}


/* Navigation Styles */

nav a {
    font-family: 'Trebuchet MS', Helvetica, sans-serif;
    padding-top: 10px;
    padding-bottom: 10px;
}

a:link {
    background-color: hsla(0, 0%, 42%, 0.4);
    text-decoration: none;
    color: white;
}

a:visited {
    background-color: hsla(0, 0%, 42%, 0.4);
    text-decoration: none;
    color: white;
}

a:hover {
    color: hsla(0, 0%, 100%, 0.7);
    background-color: hsla(0, 0%, 42%, 0.7);
}

a:active {
    color: hsla(0, 0%, 100%, 0.7);
    background-color: hsla(0, 0%, 42%, 0.7);
}


/* Section Styles */

section.playbill h1 {
    font-size: 3em;
    font-weight: normal;
}

h1 header {
    margin: 0px;
    padding-top: 20px;
    padding-right: 0px;
    padding-bottom: 10px;
    padding-left: 20px;
}

#play1 h1 header {
    font-family: Champagne, cursive;
}

#play1 {
    background-color: hsl(240, 100%, 88%);
}

#play2 {
    background-color: hsl(25, 88%, 73%);
}

#play2 h1 header {
    font-family: Grunge, 'Times New Roman' serif;
}

#play3 {
    background-color: hsl(0, 100%, 75%);
}

#play3 h1 header {
    font-family: Impact, Charcoal, sans-serif;
}

#play4 {
    background-color: hsl(296, 86%, 86%);
}

#play4 h1 header {
    font-family: Dobkin, cursive;
}


/* Description List Styles */

dt {
    font-size: 1.3em;
    font-weight: bold;
    color: hsla(0, 0%, 0%, 0.4);
}

dd {
    font-size: 1.3em;
    margin-left: 0px;
    margin-bottom: 10px;
}
4

2 回答 2

0

我取出了描述播放部分的“标题”部分。例如,

#play1 h1 header {
    font-family: Champagne, cursive;
}

应该:

#play1 h1 {
    font-family: Champagne, cursive;
}
于 2020-09-16T03:35:36.900 回答
0

我想是因为您忘记了“Times New Roman”和衬线之间的逗号

#play2 h1 header {
    font-family: Grunge, 'Times New Roman', serif;
}
于 2020-09-15T03:48:22.530 回答