R&D in Blogger
Memo for IT tech. IT技術のメモ帳。
Search This Blog
2016/11/28
CSS different child elements within a same parent同一阶层下的元素对应
HTML structure:
<div>
<span>element 1</span>
<p>element 2</p>
<p>element 3</p>
</div>
CSS:
div span {clear:both;}
div span + p {color: aquamarine;}
div span + p + p {color: blueviolet;}
No comments :
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments ( Atom )
No comments :
Post a Comment