CSS布局应用到XML文档和HTML文档


注意:首先都要在

在:/C:/Users/Administrator/Desktop/java/sample.css目录下的建立css文件



CSS布局应用到XML文档:

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/css" href="file:///C:/Users/Administrator/Desktop/java/sample.css"?>
<!--  Copyright w3school.com.cn -->
 <note time="16:06:03">
    <to>George</to>
    <from>John</from>
    <heading>Reminder</heading>
    <body>Don't forget the meeting!</body>
    </note>

在:/C:/Users/Administrator/Desktop/java/sample.css的css文件

note
  {
  font-family:Verdana, Arial;
  margin-left:30px;
  }

to
  {
  font-size:28px;
  display: block;
  }

from
  {
  font-size:28px;
  display: block;
  }

heading
  {
  color: red;
  font-size:60px;
  display: block;
  }

body
  {
  color: blue;
  font-size:35px;
  display: block;
  }

CSS布局应用到HTML文档

<html>
<head>
<link rel="stylesheet"  href="file:///C:/Users/Administrator/Desktop/java/sample.css" />
</head>
<body>

<script type="text/javascript"/>

</script>

<div class="h">qqqqqqqqqqqq</div>
<div class="l">lllllllllllllllll</div>
</body>
</html>

在:/C:/Users/Administrator/Desktop/java/sample.css的css文件

div.h
{
 font-family:华文彩云;
    
}
div.l
{
 color:red;
    
}


你可能感兴趣的:(html,xml,css,文档,encoding,stylesheet)