css 串联选择器和后代选择器介绍及示例

WBOY
Release: 2016-06-01 09:53:05
Original
1920 people have browsed it

串联选择器:作用在同一个标签上 

<code class="language-html"><div class="”a”" id="qq"><span>look at the color</span></div> 
css: #qq.a{ 
…. 
}</code>
Copy after login

后代选择器:作用在不同标签上 

<code class="language-html"><div id="qq"><span class="”a”">look at the color</span></div> 
css: #qq .a{ 
}</code>
Copy after login

注意#qq .a 之前有空格

Related labels:
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