移動端順序問題上

貴哥的程式設計之路(基礎很重要)。發表於2020-09-29
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<style type="text/css">
		*{margin: 0;padding:0;list-style: none;}
#div1,#div2,#div3{width: 200px;height: 200px;background: black;float: left;
	transition:1s;
	position: absolute;left: 50%;top: 50%;margin: -100px 0 0 -100px;
	transform:perspective(800px);
	

}
#div2
{
	transform: translateX(150px) rotate(150deg);background: green;
}
#div3
{
	transform:rotate(60deg) translateX(150px);background: red;
}
/*transform從後往前執行*/
	</style>

</head>
<body>
	<div id='div1'>
	
</div>
<div id='div2'></div>
<div id='div3'></div>
</body>
</html>

相關文章