p标签里还能放p标签吗?我这段代码网页上为什么只有letter-spacing字母间距变宽了,All i have to do,is learn Css这句字母间距没变
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>666</title>
<style type="text/css" media="all">
.ls3px{letter-spacing: 4px;}
</style>
</head>
<body>
<p class="ls3px">
<strong><a href="www.m1905.com">letter-spacing</a>示例</strong>
<p>All i have to do,is learn Css</p>
</p>
</body>
</html>
因为你.ls3px只在第一个p标签引用,另一个没引用。如果要所有p标签都用到,css可以用
p{letter-spacing: 4px;}
p嵌套别的标签是不合规范的,里面只能放文字和图片