XML/CSS Style/color
Версия от 18:22, 25 мая 2010; (обсуждение)
Color and background color
File: Data.xml
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/css" href="Style.css" ?>
<review>
<title>A</title>
<pullQuote>B</pullQuote>
<paragraph1>
C
<reference>D</reference>
<keyword>E</keyword>
F
</paragraph1>
<paragraph2>
G
<reference>H</reference>
I
<keyword>K</keyword>
L
</paragraph2>
</review>
File: Style.css
review {
display:block;
padding:10px;
margin:10px;
border-style:solid;
border-width:4px;
border-color:#000000;
}
title {
display:block;
font-size:24px;
padding:5px;
color:#FFFFFF;
background-color:#000000;
}
pullQuote {
float:left;
width:20%;
font-style:italic;
padding:10px;
margin:10px;
border:solid;
border-width:4px;
border-color:#CCCCCC;
}
paragraph1, paragraph2 {
display:block;
padding:10px;
border:solid;
border-width:4px;
border-color:#CCCCCC;
}
keyword {
display:inline;
font-weight:bold;
color:#990000;
border:solid;
border-width:2px;
border-color:#CCCCCC;
}