XML的显示--CSS

作者:袖梨 2022-07-02

通过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;

运行结果:

 

相关文章

精彩推荐