CSS 1.0 jellemzõk
Boda István, 2006. augusztus 23.
Példa1:
A hozzá tartozó CSS:
konyvek { display:block; background:lightblue; } konyv { display:block; border:pink solid 5px; font-weight:bold; font-size:24pt; text-align:center; } szerzo { font-family:sans-serif; } cim { font-style:italic; }
Példa 2:
Hozzá tartozó CSS:
konyvek { display:block; background:lightblue; } konyv { display:block; border:pink solid 5px; font-weight:bold; font-size:24pt; text-align:center; } konyv:first-letter { font-size:48pt; } szerzo:first-child { text-decoration:underline; } szerzo, tovabbiSzerzo { color:blue; } tovabbiSzerzo:before { content: "; " } cim[nyelv="en"] { color:red; } cim[nyelv="hu"] { color:green; } cim:before { color:black; content: ": " } cim:hover { color:purple; cursor:help; } cim:after { color:black; content: ". [" attr(nyelv) "]" }
Példa 3:
A hozzá tartozó CSS:
autok{ counter-reset:section; } auto:before{ counter-increment:section; content:"Sorszám: " counter(section) ". "; font-style: italic; } auto{ display: block; border: solid 1px; margin-bottom: 2cm; } marka{ display: block; font-weight: bold; } marka:after{ content: " (" attr(tipus) ")"; } evjarat { display:none; } rendszam { display:none; } alvazszam { display:none; } ar{ display: block; } ar:after{ text-decoration: underline; content: attr(penznem); }
Példa 4:
<!ELEMENT szemelyi_adatok(szemely)+> <!ELEMENT szemely (nev, kor, allampolgarsag, kep, (szemigsz|utlevelsz|diakigsz), beszelt_nyelvek)> <!ELEMENT nev (#PCDATA)> <!ELEMENT kor (#PCDATA)> <!ELEMENT allampolgarsag (#PCDATA)> <!ELEMENT kep EMPTY> <!ELEMENT szemigsz (#PCDATA)> <!ELEMENT utlevelsz (#PCDATA)> <!ELEMENT diakigsz (#PCDATA)> <!ELEMENT beszelt_nyelvek (#PCDATA|anyanyelv)*> <!ELEMENT anyanyelv (#PCDATA)> <!ATTLIST nev
titulus CDATA #IMPLIED> <!ATTLIST kep
src CDATA #REQUIRED
meret CDATA #IMPLIED> <! ATTLIST szemely
nem (férfi|nő) "férfi">
A hozzá tartozó XLS:
eletrajz CSS: (<link href="oneletrajz.css" rel="stylesheet" type="text/css" /> a html-be )
body {
background-color: lightgray;
cursor: help;
}
h1 {
font-family: "Hobo Std";
font-size: 36px;
color: green;
text-decoration: blink;
background-attachment: float;
background-image: url(magyarzaszlo.jpg);
background-repeat: repeat-x;
background-position: center center;
text-align: center;
margin: 2px;
padding: 2px;
float: center;
width: auto;
border-top-style: dotted;
border-right-style: dotted;
border-bottom-style: dotted;
border-left-style: dotted;
border-top-color: blue;
border-right-color: blue;
border-bottom-color: blue;
border-left-color: blue;
position: relative;
z-index: 1;
}
h2 {
font-family: Verdana;
font-size: 24px;
font-style: italic;
text-transform: uppercase;
color: red;
text-decoration: underline blink;
text-align: center;
vertical-align: bottom;
}
h3 {
font-family: "Comic Sans MS";
font-size: 18px;
font-weight: bold;
font-variant: small-caps;
color: blue;
border-bottom-width: thick;
border-bottom-style: double;
}
ul {
font-family: Verdana;
font-size: 12px;
font-style: italic;
background-color: pink;
float: left;
height: 50px;
width: 200px;
list-style-position: inside;
list-style-type: square;
padding-top: 20px;
padding-left: 100px;
}
a {
background-color: #FFFF00;
}
div {
font-size: large;
font-weight: bolder;
font-variant: small-caps;
text-decoration: underline;
vertical-align: baseline;
}
p {
font-family: Arial;
font-size: 14px;
color: brown;
}
beagyazott CSS: (<style type="text/css">és</style>között a HEAD-ban )
body {
background-attachment: fixed;
background-color: pink;
background-image: url(krystohanslogo.png);
background-repeat: repeat-y;
background-position: center;
}
table {
background-color: lightblue;
border-top-color: red;
border-right-color: red;
border-bottom-color: red;
border-left-color: red;
}
#sarga {
background-color: yellow;
}
.kekszoveg {
font-family: Arial;
font-size: 16px;
color: blue;
}
.vastagszoveg {
font-size: 14px;
font-weight: bold;
}
p.kekszoveg {
font-family: Arial;
font-size: 14px;
font-style: italic;
color: blue;
font-weight: bold;
}
td.kekszoveg {
font-family: Arial;
font-size: 14px;
font-style: italic;
color: blue;
}
td.vastagszoveg {
font-family: Arial;
font-size: 14px;
font-weight: bold;
}