<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>类选择器</title> <!--<link type="text/css" href="StyleSheet1.css"/>--> <style type="text/css"> .center { text-align: center; text-transform: uppercase; white-space: normal; } .image { background-image: url("images/w3school.gif"); padding: 20px; background-repeat: repeat-y; } .spread { word-spacing: 30px; } .tight { word-spacing: -0.5em; } h4 { letter-spacing: 20px; text-decoration: underline; </style> </head> <body class="image"> <h1 class="center"> This heading will be center-aligned </h1> <h4>This is header 4</h4> <a href="HTMLPage3.htm">链接</a> <p class="center"> This paragraph will be center-aligned </p> <p class="spread"> This is a paragraph. The spaces between words will be decreased. </p> <p class="tight"> This is a paragraph. The spaces between words will be increased. </p> </body> </html>