gpt4 book ai didi

css - 为什么我的 CSS 类不能应用于

标签?

转载 作者:行者123 更新时间:2023-11-28 08:59:54 25 4
gpt4 key购买 nike

为什么“测试”类不适用于 <p> 的使用情况标签和 <span>标签?

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Newsletter template</title>
<!--general stylesheet-->
<style type="text/css">
p { padding: 0; margin: 0; }
a {
color: #455670; text-decoration: underline;
}
test {
margin: 20; font-family: "Helvetica Neue"; font-size: 20px; font-weight: normal; color: #666666; line-height: 15px !important;
}
</style>
</head>
<body>
<p class="test"><span class="test"> Check the spelling of the words you typed.</span></p>
</body>
</html>

最佳答案

使用.testtest 是一个元素选择器。

关于css - 为什么我的 CSS 类不能应用于 <p> 或 <span> 标签?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8569987/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com