CSS3项目属性

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			*{margin: 0;padding: 0;}
			/*body{display:flex;}*/
			.box{
				width: 600px;
				height: 500px;
				background: pink;
				margin: 100px;
				display:flex;/*设为弹性盒*/
				align-items:center;
			}
			.box div{
				width: 100px;
				height: 100px;
				background: red;
				margin: 3px;
			}
			.box .box2{
				align-self: flex-start;
				align-self: flex-end;
				align-self: center;
				align-self: auto;
				align-self: stretch;
				align-self: center;
				order:4;
			}
			.box .box3{
				order:2;
			}
			
			.con1{
				/*width:500px;*/
				width: 100%;
				height: 50px;
				background: red;
				margin-top: 100px;
				display: flex;
				/*align-items:center;*/
			}
			.con1 input:nth-child(1){
				/*width: 396px;*/
				flex:1;/*剩余的空间给他*/
			}
			.con1 input:nth-child(2){
				width: 100px;
			}
			
		</style>
	</head>
	<body>
		<div class="box">
			<div class="box1">1</div>
			<div class="box2">2</div>
			<div class="box3">3</div>
			<div class="box4">4</div>
			<div class="box5">5</div>
		</div>
		<div class="con1">
			<input type="text" />
			<input type="submit" />
		</div>
	</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值