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

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

WBOY
WBOYOriginal
2016-06-21 09:02:121941Durchsuche

<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套用是可以的。

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn