|
CSS , . (), , . , .
. , HTML , XML - .
CSS2:
* | . | |
E | E (.. E). | |
E F | F, E. | - |
E > F | F, E. | |
E:first-child | E, E . | :first-child |
E:link E:visited | E, E (:link) (:visited). | |
E:active E:hover E:focus | E . | |
E:lang(c) | E, () ( , ). | :lang() |
E + F | F, E. | |
E[foo] | E "foo" ( - ). | |
E[foo="warning"] | E, "foo" "warning". | |
E[foo~="warning"] | E, "foo" , "warning". | |
E[lang|="en"] | E, "lang" , () "en". | |
DIV.warning | HTML. , DIV[class~="warning"]. | |
E#myid | ID E, "myid". | ID |
- , , ID . , .
, .
. ,
H1 { font-family: sans-serif } H2 { font-family: sans-serif } H3 { font-family: sans-serif }
:
H1, H2, H3 { font-family: sans-serif }
, "*", . .
*[LANG=fr]
[LANG=fr]
.
*.warning
.warning
.
*#myid
#myid
.
H1 :
H1 { font-family: sans-serif }
,
, ,
(, "
EM,
H1").
.
2-
,
.
"A B
" ,
B
- A
.
:
H1 { color: red } EM { color: red }
, , :
<H1>This headline is <EM>very</EM> important</H1>
, , EM - H1:
H1 { color: red } EM { color: red } H1 EM { color: blue }
EM :
<H1>This <SPAN class="myclass">headline is <EM>very</EM> important</SPAN></H1>
:
DIV * P
P, , , , DIV. "*".
P, BODY:
BODY > P { line-height: 1.3 }
:
DIV OL>LI P
P,
LI; LI
OL;
OL DIV.
,
">" .
. :first-child.
- : E1 + E2, E2 . , E1 E2 E1 E2.
, (, ). "+" .
, , P MATH, :
MATH + P { text-indent: 0 }
, H1 H2:
H1 + H2 { margin-top: -5mm }
, , . , , H1 class="opener":
H1.opener + H2 { margin-top: -5mm }
CSS2 , , -.
:
[att]
[att=val]
[att~=val]
[att|=val]
. .
H1, "title" :
H1[title] { color: blue; }
SPAN, "class" "example":
SPAN[class=example] { color: blue; }
, .
SPAN, "hello" "Cleveland" "goodbye" "Columbus":
SPAN[hello="Cleveland"][goodbye="Columbus"] { color: blue; }
"=" "~=". 1- , , "copyright copyleft copyeditor" "rel". 2- , "href" "http://www.w3.org/".
A[rel~="copyright"] A[href="http://www.w3.org/"]
, "lang" "fr" (.. - ).
*[LANG=fr] { display : none }
"lang", "en", "en", "en-US" "en-cockney":
*[LANG|="en"] { color : red }
, :
DIALOGUE[character=romeo] { voice-family: "Lawrence Olivier", charles, male } DIALOGUE[character=juliet] { voice-family: "Vivien Leigh", victoria, female }
EXAMPLE "notation",
"decimal".
:
<!ATTLIST EXAMPLE notation (decimal,octal) "decimal">
EXAMPLE[notation=decimal] { /*... ...*/ } EXAMPLE[notation=octal] { /*... ...*/ }
, , , , :
EXAMPLE { /*... ...*/ }
, , . , , , , .
, HTML, (.) "~=" "class". , HTML "DIV.value" "DIV[class~=value]" . ".".
class~="pastoral" :
*.pastoral { color: green } /* class~=pastoral */
.pastoral { color: green } /* class~=pastoral */
- H1 class~="pastoral":
H1.pastoral { color: green } /* H1 class~=pastoral */
H1 , - :
<H1>Not green</H1> <H1 class="pastoral">Very green</H1>
"class", ".".
P, "class" "pastoral" "marine":
P.pastoral.marine { color: green }
, class="pastoral blue aqua marine", class="pastoral blue".
. CSS "class", " " ( DIV SPAN HTML) "class". , , , - .
, ID. ID , ; , ID . HTML ID "id"; XML ID -, .
ID . CSS ID- . ID- CSS "#" ID.
ID- H1, ID "chapter1":
H1#chapter1 { text-align: center }
, ID - "z98y". , , P:
<HEAD> <TITLE>Match P</TITLE> <STYLE type="text/css"> *#z98y { letter-spacing: 0.3em } </STYLE> </HEAD> <BODY> <P id=z98y>Wide text</P> </BODY>
, , H1, , ID - "z98y". P:
<HEAD> <TITLE>Match H1 only</TITLE> <STYLE type="text/css"> H1#z98y { letter-spacing: 0.5em } </STYLE> </HEAD> <BODY> <P id=z98y>Wide text</P> </BODY>
ID- , . , HTML #p123 , [ID=p123], .
. XML 1.0 [XML10]
, ID-
, . XML,
, ID .
,
,
: [name=p371]
#p371
.
ID-.
"!important"
: [name=p371]
{color: red ! important}
. ,
XML 1. ID- .
CSS2 . , - . , HTML 4.0 (. [HTML40]) , , , , CSS .
, - .
.
, HTML :first-line :first-letter , , .
:first-child , - .
P, DIV. DIV:
DIV > P:first-child { text-indent: 0 }P DIV :
<P> P note. <DIV class="note"> <P> 1- P note. </DIV>P :
<P> P note. <DIV class="note"> <H2>Note</H2> <P> 1- P note. </DIV>
'bold' EM, - P, , , , :
P:first-child EM { font-weight : bold }
, EM :
<P>abc <EM>default</EM>P.
:
* > A:first-child /* 1- */ A:first-child /* */
, . CSS ':link' ':visited' :
. () ':link'.
.
, . , HTML 4.0 A "href". , CSS2 :
A:link { color: red } :link { color: red }
:
<A class="external" href="http://out.side/">external link</A>, :
A.external:visited { color: blue }.
. CSS :
. .
CSS , . , , ( ).
- . , , 'font-size' :active , , , .
A:link { color: red } /* */ A:visited { color: blue } /* */ A:hover { color: yellow } /* */ A:active { color: lime } /* */
, A:hover A:link A:visited, 'color' A:hover. , A:active A:hover, (lime) , A.
:
A:focus { background: yellow } A:focus:hover { background: white }
A, :focus :hover.
. CSS1 ':active' ':link' ':visited'. . ':visited', ':active' ( ':link' ':active'), .
, , CSS, , . , HTML [HTML40] "lang", META , , ( "" HTTP). XML , XML:LANG, , .
':lang(C)' , C. C - , HTML 4.0 [HTML40] RFC 1766 [RFC1766]. , '|='.
HTML :
HTML:lang(fr) { quotes: ' ' ' ' } HTML:lang(de) { quotes: '' '' '\2039' '\203A' } :lang(fr) > Q { quotes: ' ' ' ' } :lang(de) > Q { quotes: '' '' '\2039' '\203A' }
'quotes' Q . , , , , “à l'improviste” .
:first-line . :
P:first-line { text-transform: uppercase }
: " ". "P:first-line" HTML. , , .
, , , .. , HTML:
<P>This is a somewhat long HTML paragraph that will be broken into several lines. The first line will be identified by a fictional tag sequence. The other lines will be treated as ordinary lines in the paragraph.</P>:
THIS IS A SOMEWHAT LONG HTML PARAGRAPH THAT will be broken into several lines. The first line will be identified by a fictional tag sequence. The other lines will be treated as ordinary lines in the paragraph."" :first-line. , :
<P><P:first-line> This is a somewhat long HTML paragraph that will </P:first-line> be broken into several lines. The first line will be identified by a fictional tag sequence. The other lines will be treated as ordinary lines in the paragraph.</P>
, , . , SPAN:
<P><SPAN class="test"> This is a somewhat long HTML paragraph that will be broken into several lines.</SPAN> The first line will be identified by a fictional tag sequence. The other lines will be treated as ordinary lines in the paragraph.</P>SPAN :first-line.
<P><P:first-line><SPAN class="test"> This is a somewhat long HTML paragraph that will </SPAN></P:first-line><SPAN class="test"> be broken into several lines.</SPAN> The first line will be identified by a fictional tag sequence. The other lines will be treated as ordinary lines in the paragraph.</P>
:first-line -, . :first-line : , , , 'word-spacing', 'letter-spacing', 'text-decoration', 'vertical-align', 'text-transform', 'line-height', 'text-shadow' 'clear'.
:first-letter " " " ", . -, 'float' - 'none', .
, :first-letter: , , , 'text-decoration', 'vertical-align' ( 'float' 'none'), 'text-transform', 'line-height', , , , 'float', 'text-shadow' 'clear'.
CSS2 , :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> <HTML> <HEAD> <TITLE>Drop cap initial letter</TITLE> <STYLE type="text/css"> P { font-size: 12pt; line-height: 12pt } P:first-letter { font-size: 200%; font-style: italic; font-weight: bold; float: left } SPAN { text-transform: uppercase } </STYLE> </HEAD> <BODY> <P><SPAN>The first</SPAN> few words of an article in The Economist.</P> </BODY> </HTML>
:
<P> <SPAN> <P:first-letter> T </P:first-letter>he first </SPAN> few words of an article in the Economist. </P>
, :first-letter (.. ), :first-line , .
, , , . .
(.. , Unicode [UNICODE] "open" (Ps), "close" (Pe) "other" (Po)), , , :
. , , "ij" , :first-letter.
, . P '24pt'. 'blue', - 'red'.
P { color: red; font-size: 12pt } P:first-letter { color: green; font-size: 200% } P:first-line { color: blue } <P>- 2- .</P>
<P> <P:first-line> <P:first-letter> </P:first-letter>- </P:first-line> 2- . </P>
, :first-letter :first-line. , :first-line, :first-letter, , :first-letter.
':before' ':after' . .
H1:before {content: counter(chapno, upper-roman) ". "}
:first-letter :first-line :before :after, , .
P.special:before {content: "Special! "} P.special:first-letter {color: #ffd800}
"S" "Special!" .
Комментарии
к записи РВН стандарт оформления кода на языке C.
С...
к записи Ломако Александр Иванович.
Спасибо за добрые слова об Отце. Именно таким - открыты...
к записи Ломако Александр Иванович.
Про Александра Ивановича Ломако, можно говорить много ...
к записи Разместить рекламу.
Добрый день, меня зовут Вадим. Ваш сайт нас заинтересов...
к записи Сравнение ТТХ танков Т-72Б3 и Леопарда-2A6.
Интересен также Челле...