使用 CSS 选择所有元素
cssweb developmentfront end technology更新于 2024/7/23 3:24:17
要选择所有元素,请使用 * CSS 选择器。您可以尝试运行以下代码来选择所有元素:
示例
<!DOCTYPE html>
<html>
<head>
<style>
*{
color: blue;
background-color: orange;
}
</style>
</head>
<body>
<h1>Demo Website</h1>
<h2>Learning</h2>
<p id = "tutorials">Tutorials on web dev, programming, database, networking, etc.</p>
<p>Every tutorials has lessons with illustrations and figures.</p>
</body>
</html>
相关文章
有用资源
css 参考教程 - 该教程包含有关 css 的更多信息:https://www.cainiaomax.com/css/

