与后代选择器相比,子元素选择器只能选择作为某元素子元素的元素,符号为大括号.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
h1>strong{color:red}
</style>
</head>
<body>
<h1>This is <strong>very</strong><strong>very</strong>important!</h1>
</body>
</html>

相关文章:

  • 2022-02-08
  • 2021-05-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-28
猜你喜欢
  • 2022-12-23
  • 2021-12-30
  • 2021-12-28
  • 2021-12-15
  • 2021-07-22
  • 2021-12-17
  • 2021-10-03
相关资源
相似解决方案