CSS 外边距属性(Margin)

   css学习笔记:(参考:http://www.w3school.com.cn  css参考手册) 

1. CSS 外边距属性(Margin)

    实例1:设置 p 元素的上外边距:

p
  {
  margin-top:2cm;
  }

    实例2:应用

//table距离上边距10px
<table width="50% " style="margin-top:10px" align="center">

 2. 设置字体颜色    style="color:red"

		<td align="left" style="color:red">分发对象:
		  <select name="" >
			<option value="">--请选择分发对象--</option>
			<option value="">张三</option>
			<option value="">李四</option>
			<option value="">王五</option>
		  </select>
	    </td>

3. 设置表格的外边框   (不显示外边框) style="border:0;"

   <td  colspan="4" style="border:0;">
		<input type="button" style="margin-top:10px;" class="btn_gentle" value="保&nbsp;&nbsp;存" onclick="window.close();"/>
		<input type="button" style="margin-top:10px;" class="btn_gentle" value="提&nbsp;&nbsp;交" onclick="window.close();"/>
		<input type="button" style="margin-top:10px;" class="btn_gentle" value="关&nbsp;&nbsp;闭" onclick="window.close();"/>
	</td>

猜你喜欢

转载自wang-z-p2007.iteye.com/blog/2088360