CSS
1、表单的处理 <style> table, td, th{
border:1px; solid green;}
th{ background-color:green;
color: white;}
</style>
<body> <table> <tr><th>firstName</th><th>Lastname</th></tr>
<tr><td>PEE</td><td>GRR</td></tr>
2、<style><div>{ background-color:lightgrey;
width;300px;
border:25px solid green;
padding:25px;
mardin:25px;
}</style>
<body><div>KLNJFSA</div><body>
3、边框的设置
<style>
p.one{
border-style:solid;
border-width:5px;
border-color:red
}
p.two{
border-style:solid;
border-width:4px;
border-color:green;}</style>
<body>
<p class="one">NKNK</p>
<p class="two">SDNKSD</p></body>
4、指定边距
<style>p{background-color:yellow;}
p.margin{
margin-top;100px;
margin-bottom:100px;
margin-right;50px;
margin-left;50px;}
<body>
<p>DSDSDD</p>
<p class="margin">DSDSD</p></body>
5、分组选择器Grouping Selectors
<style>
h1,h2,p{
color:green;}</style>
<body><h1>DDDD</h1>
<h2>FFFF</h2></body>
6、设置元素的高度 Dimension
<style>
img.normal{
height:auto;}
img.pig{
height:12px;}</style>
<body>
<img class="normal" src="pp.gif" width="32" height="234";></body>
<img class="big" src="llsd.gif" width="23" height="23";>
7、按照百分比设置高度
<style>html{height:100%;}
body{height"100%;}
img.normal{height:auto;}
ing.big{height:50%;}
img.smalll{ height:10%;}</style>
<body><img class="normal" src="sm.gif" width="2" height="23‘’;>
<img class="small" src="we/gif" width="324" height="23";></body>