<html>
<head>
<title>CSS样式</title>
<style type="text/css">
h1, h2 {
color: blue;
font-style: italic;
}
.WARNING {
font-weight: bold;
font-size: 150%;
margin: 0 1in 0 1in;
background-color: yellow;
border: solid red 8px;
padding: 10px;
}
.WARNING h1, .WARNING h2 {
text-align: center;
}
#paragraph {
text-align: center;
text-transform: uppercase;
}
</style>
</head>
<body>
<h1>Cascading Style Sheets Demo</h1>
<div class="WARNING">
<h2>Warning</h2>
This is a warning!
Notice how it grabs your attention with its bold text and bright colors.
Also notice that the heading is centered and in blue italics.
</div>
<p id="paragraph">
This paragraph is centered<br>
and appears in uppercase letters.<br>
<span style="text-transform: none;">
Hear we explicitly use an inline style to override the uppercase letters.
</span>
</p>
</body>
</html>
<head>
<title>CSS样式</title>
<style type="text/css">
h1, h2 {
color: blue;
font-style: italic;
}
.WARNING {
font-weight: bold;
font-size: 150%;
margin: 0 1in 0 1in;
background-color: yellow;
border: solid red 8px;
padding: 10px;
}
.WARNING h1, .WARNING h2 {
text-align: center;
}
#paragraph {
text-align: center;
text-transform: uppercase;
}
</style>
</head>
<body>
<h1>Cascading Style Sheets Demo</h1>
<div class="WARNING">
<h2>Warning</h2>
This is a warning!
Notice how it grabs your attention with its bold text and bright colors.
Also notice that the heading is centered and in blue italics.
</div>
<p id="paragraph">
This paragraph is centered<br>
and appears in uppercase letters.<br>
<span style="text-transform: none;">
Hear we explicitly use an inline style to override the uppercase letters.
</span>
</p>
</body>
</html>