-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy path5 main.css
More file actions
30 lines (16 loc) · 1.03 KB
/
5 main.css
File metadata and controls
30 lines (16 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#tuna{color: red;}/*id of tuna -- exampe <p id="tuna">One</p> */
.tuna{color: red;}/*class of tuna -- exampe <p class="tuna">One</p> */
p.tuna{color: red;}/*class of tuna but has to be a paragraph-- exampe <p class="tuna">One</p> */
/*CSS3*/
/*attribute selector*/
p[name]{color: blue;} /*any paragraph with attribute name affected -- example <p name="larry">hello</p> */
p[name="bucky"]{color: blue;} /*any paragraph with attibute name="bucky" affected -- example <p name="bucky">hello</p> */
/*regular expressions in CCS3*/
/*
<p name="baconsub">One</p>
<p name="mybacon">Two</p>
<p name="omgbacontuna">Three</p>
*/
p[name^="bacon"]{color: blue;} /*any paragraph with attribute name value starting "bacon" affected -- example <p name="baconsub">One</p> */
p[name$="bacon"]{color: blue;} /*any paragraph with attribute name value ending "bacon" affected -- example <p name="mybacon">Two</p> */
p[name*="bacon"]{color: blue;} /*any paragraph with attribute name value "bacon" anywhere affected -- example <p name="mybacon">Two</p> */