CSS3 2D转换--移动translate
explain:
code:
<!DOCTYPE html><html lang="en">
<head>
<meta charset="UTF-8">
<title>translate(x,y)</title>
<style type="text/css">
div { width: 1500px; height: 250px; background: #abcdef; margin: auto; }
div > img {
/*第一个参数不可以不写,即使不想设置也得写0*/
transform: translate(0,100px);
}
</style>
</head>
<body>
<div><img src="https://www.pianshen.com/article/291962780/images/sprite.jpg"></div>
</body>
</html>
以上是 CSS3 2D转换--移动translate 的全部内容, 来源链接: utcz.com/a/58638.html