author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Mon, 07 Dec 2015 01:02:08 +0200 | |
changeset 1789 | 5be99e065b56 |
parent 1788 | d00684d41301 |
child 1905 | fba288d59662 |
permissions | -rw-r--r-- |
1045 | 1 |
.. -*- coding: utf-8; -*- |
1334
9bf0d5a1f0cf
Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1048
diff
changeset
|
2 |
.. include:: HEADER.rst |
1045 | 3 |
|
4 |
====== |
|
5 |
CSS. |
|
6 |
====== |
|
7 |
.. contents:: |
|
8 |
||
9 |
Adding CSS to HTML. |
|
10 |
=================== |
|
11 |
||
12 |
Include in head tag:: |
|
13 |
||
14 |
<html> |
|
15 |
<head> |
|
16 |
<link href="path-to.css" rel="stylesheet" type="text/css"> |
|
17 |
</head> |
|
18 |
... |
|
19 |
<html> |
|
20 |
||
21 |
or:: |
|
22 |
||
23 |
<head> |
|
24 |
<style type="text/css"> |
|
25 |
h1 {border-width: 1; border: solid; text-align: center} |
|
26 |
</style> |
|
27 |
</head> |
|
28 |
||
29 |
To change style in specific tag use:: |
|
30 |
||
31 |
<b style="color: blue; font-family: ariel">Welcome!</b> |
|
32 |
||
33 |
Selectors. |
|
34 |
========== |
|
1389
4ab574ec7067
Add links to standard.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
35 |
:: |
1045 | 36 |
|
37 |
tag {} |
|
38 |
.class {} |
|
39 |
#id {} для id разрешены символы |
|
40 |
* {} - любой элемент |
|
41 |
||
42 |
tag tag1 {} - выбор tag1, у которых есть предок tag |
|
43 |
tag > tag {} - выбор дочернего элемента |
|
44 |
tag + tag {} - выбор соседних элементов |
|
45 |
tag ~ tag {} - выбор любого соседа |
|
46 |
||
47 |
[attr] {} |
|
1433
933af00eae13
Selector by several attributes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1408
diff
changeset
|
48 |
[attr1][attr2] {} |
1045 | 49 |
[attr="..."] {} |
50 |
[attr~="..."] {} - присутствует слово ... в поле атрибута |
|
51 |
[attr*="..."] {} - присутствует набор символов ... в поле атрибута |
|
52 |
[attr^="..."] {} - начинается с ... в поле атрибута |
|
53 |
[attr$="..."] {} - заканчивается на ... в поле атрибута |
|
54 |
tag [attr|="..."] {} |
|
55 |
||
56 |
:link - не посещенные ссылки |
|
57 |
:visited - посещенные ссылки |
|
58 |
:active - нажатие на левую клавишу мыши на элементе |
|
59 |
:hover - назначать при наведении |
|
60 |
:focus - при фокусировке элемента |
|
61 |
:first-child - первый подэлемент |
|
62 |
:last-child - последний подэлемент |
|
63 |
||
64 |
:first-line |
|
65 |
:first-letter - выбрать первую букву (не приминимо к inline элементам) |
|
66 |
:before{content:"..."}, ставит перед контентом элементов строку xxx (можно |
|
67 |
использовать счетчики) |
|
68 |
:after{} - тоже, что и before, только ставит текст после контента тега |
|
69 |
||
1389
4ab574ec7067
Add links to standard.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
70 |
See: |
4ab574ec7067
Add links to standard.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
71 |
|
4ab574ec7067
Add links to standard.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
72 |
* http://www.w3.org/TR/CSS2/selector.html |
4ab574ec7067
Add links to standard.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
73 |
* http://www.w3.org/TR/css3-selectors/#selectors |
4ab574ec7067
Add links to standard.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
74 |
|
1408
085cde50fc0c
CSS include statement.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1389
diff
changeset
|
75 |
CSS include statement. |
085cde50fc0c
CSS include statement.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1389
diff
changeset
|
76 |
====================== |
085cde50fc0c
CSS include statement.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1389
diff
changeset
|
77 |
:: |
085cde50fc0c
CSS include statement.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1389
diff
changeset
|
78 |
|
085cde50fc0c
CSS include statement.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1389
diff
changeset
|
79 |
@import url("common.css"); |
085cde50fc0c
CSS include statement.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1389
diff
changeset
|
80 |
|
1461
f030b717a402
Default style for HTML elements.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1433
diff
changeset
|
81 |
Default style for HTML elements. |
f030b717a402
Default style for HTML elements.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1433
diff
changeset
|
82 |
================================ |
f030b717a402
Default style for HTML elements.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1433
diff
changeset
|
83 |
|
f030b717a402
Default style for HTML elements.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1433
diff
changeset
|
84 |
* http://www.w3.org/TR/CSS2/sample.html |
f030b717a402
Default style for HTML elements.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1433
diff
changeset
|
85 |
|
1045 | 86 |
Emacs. |
87 |
====== |
|
88 |
:: |
|
89 |
||
90 |
$ sudo apt-get install css-mode |
|
91 |
||
92 |
Graphical editor. |
|
93 |
================= |
|
94 |
:: |
|
95 |
||
96 |
$ sudo apt-get install cssed |
|
97 |
||
1048
409aab81f818
CSS browser support.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1046
diff
changeset
|
98 |
CSS browser support. |
1045 | 99 |
==================== |
100 |
||
1048
409aab81f818
CSS browser support.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1046
diff
changeset
|
101 |
* http://www.quirksmode.org/css/contents.html |
409aab81f818
CSS browser support.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1046
diff
changeset
|
102 |
* http://en.wikipedia.org/wiki/Comparison_of_layout_engines_%28CSS%29 |
409aab81f818
CSS browser support.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1046
diff
changeset
|
103 |
* http://www.css3.info/modules/selector-compat/ |
1045 | 104 |
|
1535
e499cb39b573
CSS frameworks. CSS compilers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1461
diff
changeset
|
105 |
CSS compilers. |
e499cb39b573
CSS frameworks. CSS compilers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1461
diff
changeset
|
106 |
============== |
e499cb39b573
CSS frameworks. CSS compilers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1461
diff
changeset
|
107 |
|
e499cb39b573
CSS frameworks. CSS compilers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1461
diff
changeset
|
108 |
http://lesscss.org/ |
e499cb39b573
CSS frameworks. CSS compilers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1461
diff
changeset
|
109 |
LESS extends CSS with dynamic behavior such as variables, |
e499cb39b573
CSS frameworks. CSS compilers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1461
diff
changeset
|
110 |
mixins, operations and functions. |
e499cb39b573
CSS frameworks. CSS compilers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1461
diff
changeset
|
111 |
http://sass-lang.com/ |
e499cb39b573
CSS frameworks. CSS compilers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1461
diff
changeset
|
112 |
Sass is the most mature, stable, and powerful professional grade |
e499cb39b573
CSS frameworks. CSS compilers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1461
diff
changeset
|
113 |
CSS extension language in the world. |
e499cb39b573
CSS frameworks. CSS compilers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1461
diff
changeset
|
114 |
|
e499cb39b573
CSS frameworks. CSS compilers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1461
diff
changeset
|
115 |
CSS frameworks. |
e499cb39b573
CSS frameworks. CSS compilers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1461
diff
changeset
|
116 |
=============== |
e499cb39b573
CSS frameworks. CSS compilers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1461
diff
changeset
|
117 |
|
1788 | 118 |
http://usablica.github.io/front-end-frameworks/ |
119 |
Front-end Frameworks v2.5 (comparing). |
|
120 |
http://usablica.github.io/front-end-frameworks/compare.html |
|
121 |
A Collection of best front End frameworks. |
|
1535
e499cb39b573
CSS frameworks. CSS compilers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1461
diff
changeset
|
122 |
http://960.gs/ |
1788 | 123 |
Grid framework. |
124 |
||
125 |
Bootstrap. |
|
126 |
---------- |
|
127 |
||
128 |
From `Twitter <https://twitter.com/getbootstrap>`_. |
|
129 |
||
130 |
License: MIT. |
|
131 |
||
132 |
http://getbootstrap.com/ |
|
133 |
Home page. |
|
134 |
https://github.com/twbs/bootstrap/ |
|
135 |
GitHub page. |
|
136 |
http://bootswatch.com/ |
|
137 |
Free themes for Bootstrap. |
|
1789
5be99e065b56
bootstrap-social, Font-Awesome.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1788
diff
changeset
|
138 |
http://lipis.github.io/bootstrap-social/ |
5be99e065b56
bootstrap-social, Font-Awesome.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1788
diff
changeset
|
139 |
Social icons. |
1788 | 140 |
|
141 |
Semantic UI. |
|
142 |
------------ |
|
143 |
||
144 |
License: MIT. |
|
145 |
||
146 |
http://semantic-ui.com/ |
|
147 |
Home page. |
|
148 |
https://github.com/Semantic-Org/Semantic-UI |
|
149 |
GitHub page. |
|
150 |
||
151 |
Pure. |
|
152 |
----- |
|
153 |
||
154 |
From `Yahoo <https://www.yahoo.com/>`_. |
|
155 |
||
156 |
License: `Yahoo BSD License <https://github.com/yahoo/pure/blob/master/LICENSE.md>`_. |
|
157 |
||
1535
e499cb39b573
CSS frameworks. CSS compilers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1461
diff
changeset
|
158 |
http://purecss.io/ |
1788 | 159 |
Home page. |
160 |
https://github.com/yahoo/pure/ |
|
161 |
GitHub page. |
|
162 |
||
163 |
Foundation. |
|
164 |
----------- |
|
165 |
||
166 |
From Zurb. |
|
167 |
||
168 |
License: MIT |
|
169 |
||
1535
e499cb39b573
CSS frameworks. CSS compilers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1461
diff
changeset
|
170 |
http://foundation.zurb.com/ |
1788 | 171 |
Home page. |
172 |
https://github.com/zurb/foundation-sites |
|
173 |
GitHub page. |
|
174 |
||
175 |
UIkit. |
|
176 |
------ |
|
1535
e499cb39b573
CSS frameworks. CSS compilers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1461
diff
changeset
|
177 |
|
1788 | 178 |
From `yootheme <http://yootheme.com/>`_. |
1535
e499cb39b573
CSS frameworks. CSS compilers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1461
diff
changeset
|
179 |
|
1788 | 180 |
License: MIT. |
181 |
||
182 |
http://getuikit.com/ |
|
183 |
Home page. |
|
184 |
https://github.com/uikit/uikit |
|
185 |
GitHub page. |
|
1789
5be99e065b56
bootstrap-social, Font-Awesome.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1788
diff
changeset
|
186 |
|
5be99e065b56
bootstrap-social, Font-Awesome.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1788
diff
changeset
|
187 |
Font-Awesome. |
5be99e065b56
bootstrap-social, Font-Awesome.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1788
diff
changeset
|
188 |
------------- |
5be99e065b56
bootstrap-social, Font-Awesome.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1788
diff
changeset
|
189 |
|
5be99e065b56
bootstrap-social, Font-Awesome.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1788
diff
changeset
|
190 |
https://github.com/FortAwesome/Font-Awesome |
5be99e065b56
bootstrap-social, Font-Awesome.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1788
diff
changeset
|
191 |
GitHub page. |
5be99e065b56
bootstrap-social, Font-Awesome.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1788
diff
changeset
|
192 |