flex佈局實現等分

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			.color_container {
				width: 100%;
				height: 22px;
				display: flex;
				flex-direction: row
			}
			.color_container>div{
				height: 22px;
				flex: 1;
				margin-left: 10px;
			}
		</style>
	</head>
	<body>
		<div class="color_container">
		<div title="紫色" style="background-color: rgb(121, 56, 106);"></div>
		<div title="藍色" style="background-color: rgb(57, 107, 179);"></div>
		<div title="綠色" style="background-color: rgb(152, 203, 104);"></div>
		<div title="黃色" style="background-color: rgb(251, 220, 4);"></div>
		<div title="橙色" style="background-color: rgb(243, 121, 32);"></div>
		<div title="紅色" style="background-color: rgb(202, 33, 40);"></div>
		</div>
	</body>
</html>

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章