xml檔案與css檔案

來源:互聯網
上載者:User

今天看書才知道xml檔案可以根據css檔案來實現在IE中漂亮地顯示

如books.xml檔案內容如下:

<?xml version="1.0" ?>
<?xml:stylesheet href="books.css" type="text/css" ?>
<books>
 <book>
  <title>.Net using</title>
  <ISBN>1861-12991-04-0</ISBN>
  <authors>
   <authors>YZX</authors>
   <authors>ZQH</authors>
  </authors>
 </book>
</books>
books.css檔案內容如下:

title
{
 display:block;
 font-size:20pt;
 color:#9370db;
 text-align:center;
}
ISBN
{
 display:block;
 font-weight:bold;
 font-size:12pt;
 color:#c71585;
 text-align:left;
}

這樣在IE中顯示就不會這樣

 

而是這樣

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.