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

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

WBOY
Release: 2016-06-21 09:02:12
Original
1995 people have browsed it

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

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


回复讨论(解决方案)

.a 空格 .b {}

.a 空格 .b {}


试过,没用



red



this one

this one



p标签套div这样有用吗

p标签套div这样有用吗


这只是个示范

经测试div套用是可以的。

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template