171

 

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Dddddd</title>
	<style type="text/css">
		body,p,h1,h2,h3,h4,h5,h6,dl,dd{margin:0; font-size:12px; font-family:"SimHei","Microsoft Yahei","Arial";}
		ol,ul{padding:0;margin:0;}
		li{list-style:none;}
		a{text-decoration:none;}
		img{border:none;vertical-align:top;}

		form{margin:0;}
		input{margin:0;padding:0;}
		select{margin:0;}
		textarea{margin:0; padding:0;resize:none; overflow:auto; outline:none;}

		th,td{padding:0;}
		table{border-collapse:collapse;}
/* 默认样式重置 (css reset)  */
	</style>
</head>
<body>
	<div style="background: blue;width: 960px;height: 30px;">
		<p style="">xxxxxxxxxxxxxxxxxxxxxxx</p>
		<p style="background: red;margin-left:auto;width: 60px;height: 30px;">sssssssssssssssss</p>
	</div>

<p>只有一个auto为需要值:</p>
	<div style="background: yellow;width: 960px;height: 30px;">
		<p style="background: red;margin-left:auto;width: 60px;">sssssssssssssssss</p>
		<p style="">xxxxxxxxxxxxxxxxxxxxxxx</p>
	</div>

<p>当宽和左边距都受限,右边距是否为aotu即需要值</p>
	<div style="background: yellow;width: 960px;height: 30px;">
		<p style="background: red;width: 60px;margin-left: 0;">sssssssssssssssss</p>
		<p style="margin-left: 0;">xxxxxxxxxxxxxxxxxxxxxxx</p>
	</div>
</body>
</html>

 

转载于:https://my.oschina.net/u/2444023/blog/738815

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值