-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathcss_tricks.css
96 lines (85 loc) · 3.8 KB
/
css_tricks.css
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/* coordinates */
T R B L /* 4 elems */
T RL B /* 3 elems */
TB RL /* 2 elems */
TRBL /* 1 elem */
/*center div*/
margin: 0 auto;
* /* any element */
E /* an element of type E */
E[foo] /* an E element with a "foo" attribute */
E[foo="bar"] /* an E element whose "foo" attribute value is exactly equal to "bar" */
E[foo~="bar"] /* an E element whose "foo" attribute value is a list of whitespace-separated values, one of which is exactly equal to "bar" */
E[foo^="bar"] /* an E element whose "foo" attribute value begins exactly with the string "bar" */
E[foo$="bar"] /* an E element whose "foo" attribute value ends exactly with the string "bar" */
E[foo*="bar"] /* an E element whose "foo" attribute value contains the substring "bar" */
E[foo|="en"] /* an E element whose "foo" attribute has a hyphen-separated list of values beginning (from the left) with "en" */
E[rel="handsome"][title^="Important"] /* you can combine them */
E:root /* an E element, root of the document */
E:nth-child(n) /* an E element, the n-th child of its parent */
E:nth-last-child(n) /* an E element, the n-th child of its parent, counting from the last one */
E:nth-of-type(n) /* an E element, the n-th sibling of its type */
E:nth-last-of-type(n) /* an E element, the n-th sibling of its type, counting from the last one */
E:first-child /* an E element, first child of its parent */
E:last-child /* an E element, last child of its parent */
E:first-of-type /* an E element, first sibling of its type */
E:last-of-type /* an E element, last sibling of its type */
E:only-child /* an E element, only child of its parent */
E:only-of-type /* an E element, only sibling of its type */
E:empty /* an E element that has no children (including text nodes) */
E:visited /* an E element being the source anchor of a hyperlink of which the target is not yet visited (:link) or already visited (:visited) */
E:focus /* an E element during certain user actions */
E:target /* an E element being the target of the referring URI */
E:lang(fr) /* an element of type E in language "fr" (the document language specifies how language is determined) */
E:disabled /* a user interface element E which is enabled or disabled */
E:checked /* a user interface element E which is checked (for instance a radio-button or checkbox) */
E::first-line /* the first formatted line of an E element */
E::first-letter /* the first formatted letter of an E element */
E::before /* generated content before an E element */
E::after /* generated content after an E element */
E.warning /* an E element whose class is "warning" (the document language specifies how class is determined). */
E#myid /* an E element with ID equal to "myid". */
E:not(s) /* an E element that does not match simple selector s */
E F /* an F element descendant of an E element */
E > F /* an F element child of an E element */
E + F /* an F element immediately preceded by an E element */
E ~ F /* an F element preceded by an E element */
rounded corners {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
}
/* clearfix */
.group:before,
.group:after {
content: "";
display: table;
}
.group:after {
clear: both;
}
.group {
zoom: 1;
}
box shadow { /* x-offset y-offset blur color */
-moz-box-shadow: inset 4px 4px 8px #222;
-webkit-box-shadow: inset 4px 4px 8px #222;
box-shadow: inset 4px 4px 8px #222;
}
text shadow { /* x-offset y-offset blur color */
text-shadow: 4px 4px 8px #222;
}
img:hover {
-o-transform: scale(1.5);
-moz-transform: scale(1.5);
-webkit-transform: scale(1.5);
transform: scale(1.5);
}
multiple images {
background: center top url("bg.png") repeat;
background: url("city.png") no-repeat center top, url(bg.png);
}
off white background{
background: #f4f4f4 url(../images/background.png);
}
/* don't set stroke to text or you'll get fuzzy text, set it to auto */