一聚教程网:一个值得你收藏的教程网站

热门教程

XML的显示--CSS

时间:2022-07-02 13:13:24 编辑:袖梨 来源:一聚教程网

通过CSS样式表,设置XML文档中每个标记的显示方式。
booklist.css
 

/**//* CSS Document */
booklist{...}{
display: block;
margin: 2px;
padding: 2px;

border: 1px solid #000000;
font: 12px georgia;
}
book{...}{
display: block;
margin: 2px;
padding: 2px;
border: 1px solid #000000;
}
name{...}{
display: block;
font-style: italic;
font-weight: bold;
}
price{...}{
display: block;
font-family: georgia;
}
description{...}{
display: block;
font-size: 11px;
}
publisher{...}{
display: block;
font-size: 11px;
}
booklist.xml
引用CSS样式表




]>



Ajax
$5.95
Foundations of Ajax.
&publisher;


Ajax Patterns
$7.95
Introduction of Ajax Patterns.
&publisher;


Ajax Web App
$8.95
Edition 2.
&publisher;


Core CSS
$4.50
A book for CSS.
&publisher;


JSF and Ajax
$6.95
Apress.
&publisher;

运行结果:

 

热门栏目