赞
踩
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <title>设置背景色,本例演示如何为元素设置背景颜色 </title>
- <style type="text/css">
- body {
- background-color: yellow;
- }
-
- h1 {
- background-color: #00FF00
- }
-
- h2 {
- background-color: transparent;
- }
-
- p {
- background-color: rgb(250, 0, 0);
- }
-
- p.no2 {
- background-color: gray;
- padding-left: 20px;
- }
- </style>
- </head>
- <body>
- <h1>这是标题1</h1>
- <h2>这是标题2</h2>
- <p>这是段落</p>
- <p class="no2">这个段落设置了内边距20像素</p>
- </body>
- </html>

赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。