<style type="text/css">
b,#f1,.c1{
font-size: 30px;
color: coral;
background-color: bisque;
text-align: center;
}
div p a{
text-align: center;
font-size: 90px;
color:blue;
</style>
</head>
<body>
<b>我是粗体</b>
<p id="f1">我是段落</p>
<h1 class="c1">我是标题一</h1>
<h2 class="c1">w我是标题二</h2>
<div>
<p>
<a>
点我一些我就去百度
</a>
</p>
</div>
</body>
你是想哪个节点居中?a标签居中吗?要a标签居中你要给p标签设置text-align: center;
父级选择器 不能居中 , 组合选择器 b 标签 感觉也没用 , 这个咋弄啊 哈哈
所以你的问题是想解决什么?