<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <title>Document</title>
	<style>
		#d1,#d2{
			width:200px;
			height:200px;
			position:absolute;
			left:400px;
			top:200px;
		}
		#d1{
			background:#f00;
			border:1px solid #000;
		}
		#d2{
			background:#999;
			border:1px solid #000;
			opacity:0.5;

			/*位移*/
			/* transform:translate(100px,-50px) */

			/* transform:scaleX(-2); */
			/* transform:scale(-2); */

			/*更改转换原点*/
			/* transform-origin:left top; */
			transform:translate(50px) rotate(45deg);
		}
	</style>
 </head>
 <body>
  <div >参考元素</div>
	<div >转换元素</div>
 </body>
</html>

JS-tranform-位移

相关文章:

  • 2022-01-21
  • 2022-12-23
  • 2021-09-23
  • 2021-10-14
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-21
  • 2022-12-23
  • 2021-07-08
  • 2021-09-20
  • 2022-12-23
相关资源
相似解决方案