css边框与边界

<!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">
<html>
	<head>
		<title>CSS边框与边界</title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
	</head>
	<style type = "text/css">
		img
		{	
			border:dashed 1px green;
		}
	</style>
	<body>
		<!-- border-color      十六进制 -->      
		<!-- border-color      英文名称 -->
		<!-- border-color      三原色   -->
		<!-- 
			可依序设置上、右、下、左线颜色
			border-color:red 四边均为红色
			border-color:red green 上下为红色、左右为绿色
			border-color:red green blue 上为红色、左右为绿色、下为蓝色
			border-color:red green blue yellow 上右下左分别为红绿蓝黄

		-->
		
		<!-- border-width  长度    border-width:0.2cm 0.3cm 0.4cm 0.5cm; -->
		<!-- border-width  长度    border-width:1 2 3 4; -->
		
		<!-- border-style  none    不显示边线 -->
		<!-- border-style  dotted  点线       -->
		<!-- border-style  dashed  虚线       -->
		<!-- border-style  solid   实线       -->
		<!-- border-style  double  双线       -->
		
		<!-- 简写形式 border:长度 形态 颜色;   -->
		<!-- 简写形式 border:1px dashed green; -->
		
		<img src = "4.jpg" />
	</body>
</html>  


 

<!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">
<html>
	<head>
		<title>CSS边框与边界</title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
	</head>
	<style type = "text/css">
		/*
			margin是对象挤压外界
			padding是对象挤压自身
		*/
		table
		{
			
		}
	</style>
	<body>
		
		<!-- padding 内边距 -->
		<!-- padding-bottom    长度/百分比   元件下端边线的空隙 -->
		<!-- padding-left      长度/百分比   元件左端边线的空隙 -->
		<!-- padding-right     长度/百分比   元件右端边线的空隙 -->
		<!-- padding-top       长度/百分比   元件上端边线的空隙 -->
		<!-- 简写形式 -->
		<!-- padding 10px 上下左右 10px -->
		<!-- padding 10px 20px 上下为20px 左右为40px -->
		<!-- padding 10px 20px 30px 上下-->
		<!-- padding 10px 20px 30px 40px 上右下左分别是10、20、30、40px-->
		
		<!-- margin 外边据 -->
		<!-- margin-bottom   auto           自动调整空隙 -->
		<!-- margin-bottom   长度/百分比    设置下端空隙 -->
		<!-- margin-left     auto           自动调整空隙 -->
		<!-- margin-bottom   长度/百分比    设置左端空隙 -->
		<!-- margin-right    auto           自动调整空隙 -->
		<!-- margin-bottom   长度/百分比    设置右端空隙 -->
		<!-- margin-top      auto           自动调整空隙 -->
		<!-- margin-bottom   长度/百分比    设置上端空隙 -->
		
		<table bgcolor = "red" border = "0" width = "300" height = "200" cellspacing = "0" cellpadding = "0">
			<tr><td valign = "top">PHP100.COM中文网<td></tr>
		</table>
	</body>
</html>  


 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值