Created
May 21, 2012 14:23
-
-
Save tyv/2762567 to your computer and use it in GitHub Desktop.
все элементы с атрибутом id
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body | |
{ | |
font-size: 24px | |
} | |
/* все элементы с атрибутом id */ | |
div[id] | |
{ | |
color: red; | |
} | |
/* все элементы с атрибутом class с определнным значением */ | |
div[class="myclass mysuperclass"] | |
{ | |
text-decoration: underline; | |
} | |
/* все элементы с атрибутом id и определенным класс */ | |
/* не затрагивает двойные — сравнение по строке */ | |
div[id][class="myclass"] | |
{ | |
border-top: 2px dashed #000; | |
} | |
/* а так выбирает по слову */ | |
div[id][class~="myclass"] | |
{ | |
background: yellow; | |
} | |
/* | |
E[foo^="bar"] — начало | |
E[foo$="bar"] — конец | |
*/ | |
/* содержит */ | |
div[title*="ест"] | |
{ | |
font-style: italic; | |
} | |
/* | |
E[lang|="en"] > lang="en-au" | |
E[src|="figure"] > img src="figure-1.png", img src="figure-2.png" | |
*/ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="myid">текст</div> | |
<div class="myclass" title="тут есть текст">текст</div> | |
<div id="myid2" class="myclass">текст</div> | |
<div id="myid3" class="myclass mysuperclass">текст</div> | |
<div id="myid4 mysupperid" class="myclass mysuperclass">текст</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"separate","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment