Home  >  Article  >  Web Front-end  >  css类选择器如何选择A类对象下的所有B类对象_html/css_WEB-ITnose

css类选择器如何选择A类对象下的所有B类对象_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-21 09:02:121945browse

<p class='a'>red</p><p class='a'>		<p class='b'>this one</p>		<div class='b'>and this one</div>...</p>

请问如何选择如上中的
this one
and this one 两个元素
我用
.a.b{}
试验是错误的。


回复讨论(解决方案)

.a 空格 .b {}

.a 空格 .b {}


试过,没用



red



this one

this one



p标签套div这样有用吗

p标签套div这样有用吗


这只是个示范

经测试div套用是可以的。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn