位置:首頁 > 軟件操作教程 > 編程開發(fā) > CSS > 問題詳情

CSS3 2D轉(zhuǎn)換 1.移動translate()

提問人:劉團圓發(fā)布時間:2020-11-19

使用translate()方法可以根據(jù)左(X軸)和頂部(Y軸)位置給定的參數(shù),從當前元素位置移動,

通過一個實例來了解translate。方法。

【例題】使用translate()方法

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>Document</title>

<style>

div{

width: 200px;

height: 200px;

background: blue;

transform: translate(50px,50px);

}

</style>

</head>

<body>

<div></div>

</body>

</html>

image.png

繼續(xù)查找其他問題的答案?

相關視頻回答
回復(0)
返回頂部