文章出處

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>FLEX</title>
</head>
<body>
<style>
footer{
	display:flex;
	flex-flow:row wrap;
	align-items: stretch;
	/*
	justify-content : flex-end;
	主軸排列方式
	*/
	/*
	justify-content : flex-start;
	*/
	justify-content : center;
	/*
	justify-content : space-between;
	*/
	
	align-content : flex-start;
	/*
	側軸排列方式
	flex-end : 開頭
	center 中心
	space-between 均勻排列
	space-around 另一種均勻排列
	stretch 伸縮排列
	*/
}
div{
	/*
	flex: 1 0 7rem;
	width:15%;
	*/
}
div:nth-child(1){
	/*flex和在sencha里面的flex一樣的
	flex-grow flex-shrink flex-basis;
	*/
	flex : 1; 
}
div:nth-child(2){
	/*
	在不改變結構的情況下,更改頁面排列方式
	*/
	order :  1;
	flex : 2
}
</style>
<!--
神奇的flex布局..
-->
<footer>
	<div>1</div>
	<div>2</div>
	<div>3</div>
	<div>4</div>
</footer>
</body>
</html>

  


文章列表


不含病毒。www.avast.com
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 大師兄 的頭像
    大師兄

    IT工程師數位筆記本

    大師兄 發表在 痞客邦 留言(0) 人氣()