You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

CSS设置playbill背景未通过Cengage作业校验,求代码排查

我已经联系了教授和同学,还将对应章节重读了两遍寻找答案,我们使用的教材为:HTML5 & CSS by Carey 第7版

目前playbill背景的相关代码未通过校验,Cengage给出的相关校验内容包含覆盖层说明、当前站点效果校验结果、参考解决方案三部分。

作业要求说明如下:

Playbill背景要求:每个playbill区块由play1到play4的不同ID值标识,请创建样式规则为每个playbill设置不同的背景色,对应颜色如下:

  • ID:play1 设置为 hsl(240, 100%, 88%)
  • ID:play2 设置为 hsl(25, 88%, 73%)
  • ID:play3 设置为 hsl(0, 100%, 75%)
  • ID:play4 设置为 hsl(296, 86%, 86%)

每个playbill区块的标题也需要使用不同字体,请为四个playbill内的h1标题创建样式规则,应用如下字体栈:

  • ID:play1 设置为 Champagne, cursive
  • ID:play2 设置为 Grunge, 'Times New Roman', Times, serif
  • ID:play3 设置为 Impact, Charcoal, sans-serif
  • ID:play4 设置为 Dobkin, cursive

我当前编写的代码如下:

/* Section Styles */
section.playbill h1{
  font-size: 3em;
  font-weight: normal;
  margin: 0px;
  padding: 20px 0px 10px 20px;
}

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

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

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

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

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

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

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

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

内容的提问来源于stack exchange,提问作者Julie Stern

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.10.15 12:54:05