15
2019
04

元素平移

直接上代码演示:

<!DOCTYPE html>    
<html>    
	<head>    
		<meta charset="UTF-8">    
		<title></title>    
		<style type="text/css">    
			*{    
				padding: 0;    
				margin: 0;    
			}    
			.dd{    
				width: 300px;    
				height: 200px;    
				background: darkcyan;    
				margin: 50px auto;    
				transform: translate(100px,50px);  /*translate 元素平移       就算被定位也可以平移的*/    
			}    
		</style>    
	</head>    
	<body>    
		<div class="dd"></div>    
	</body>    
</html>

原文链接:https://www.qiquanji.com/post/7606.html

本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。

微信扫码关注

更新实时通知

« 上一篇 下一篇 »

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。