EduCoder-Web程序设计基础-html5— CSS3选择器-基础选择器-第4关:文字Google结构设计

任务描述

本关任务:使用类选择器和id选择器设置文字样式。

编程要求

请在右侧编辑器的Begin - End区域内设置各字母的样式,具体要求是:
1.类名为blue的元素对应的文字颜色值为#2B75F5
2.类名为red的元素对应的文字颜色值为#D33E2A
3.id名为orange的元素对应的文字颜色值为#FFC609
4.id名为green的元素对应的文字颜色值为#00A45D

测试说明

补充代码后,请点击测评,平台会对你编写的代码进行测试,如果正确则完成闯关任务。

越努力越幸运,祝你成功!

代码示例

<!doctype html>
<html><head>
<meta charset="utf-8">
<title>文字Logo</title>

<style type="text/css">
<!--------- Begin-------->
strong{
      
       font-size:100px;}
.blue {
      
      
    color:#2B75F5;
}
.red {
      
      
    color:#D33E2A
}
#orange {
      
      
    color:#FFC609
}
#green {
      
      
    color:#00A45D;
}

  


  
<!--------- End-------->
</style>
</head>
<body>
<strong class="blue">G</strong>
<strong class="red">o</strong>
<strong id="orange">o</strong>
<strong class="blue">g</strong>
<strong id="green">l</strong>
<strong class="red">e</strong>
</body>
</html>

Guess you like

Origin blog.csdn.net/weixin_51402180/article/details/121850970