author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Sun, 06 Dec 2015 19:23:18 +0200 | |
changeset 1788 | d00684d41301 |
parent 1535 | e499cb39b573 |
child 1789 | 5be99e065b56 |
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. |
|
138 |
||
139 |
Semantic UI. |
|
140 |
------------ |
|
141 |
||
142 |
License: MIT. |
|
143 |
||
144 |
http://semantic-ui.com/ |
|
145 |
Home page. |
|
146 |
https://github.com/Semantic-Org/Semantic-UI |
|
147 |
GitHub page. |
|
148 |
||
149 |
Pure. |
|
150 |
----- |
|
151 |
||
152 |
From `Yahoo <https://www.yahoo.com/>`_. |
|
153 |
||
154 |
License: `Yahoo BSD License <https://github.com/yahoo/pure/blob/master/LICENSE.md>`_. |
|
155 |
||
1535
e499cb39b573
CSS frameworks. CSS compilers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1461
diff
changeset
|
156 |
http://purecss.io/ |
1788 | 157 |
Home page. |
158 |
https://github.com/yahoo/pure/ |
|
159 |
GitHub page. |
|
160 |
||
161 |
Foundation. |
|
162 |
----------- |
|
163 |
||
164 |
From Zurb. |
|
165 |
||
166 |
License: MIT |
|
167 |
||
1535
e499cb39b573
CSS frameworks. CSS compilers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1461
diff
changeset
|
168 |
http://foundation.zurb.com/ |
1788 | 169 |
Home page. |
170 |
https://github.com/zurb/foundation-sites |
|
171 |
GitHub page. |
|
172 |
||
173 |
UIkit. |
|
174 |
------ |
|
1535
e499cb39b573
CSS frameworks. CSS compilers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1461
diff
changeset
|
175 |
|
1788 | 176 |
From `yootheme <http://yootheme.com/>`_. |
1535
e499cb39b573
CSS frameworks. CSS compilers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1461
diff
changeset
|
177 |
|
1788 | 178 |
License: MIT. |
179 |
||
180 |
http://getuikit.com/ |
|
181 |
Home page. |
|
182 |
https://github.com/uikit/uikit |
|
183 |
GitHub page. |