溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

css3如何實現(xiàn)旋轉(zhuǎn)圖像

發(fā)布時間:2021-11-26 10:46:55 來源:億速云 閱讀:171 作者:柒染 欄目:開發(fā)技術(shù)

本篇文章給大家分享的是有關(guān)css3如何實現(xiàn)旋轉(zhuǎn)圖像,小編覺得挺實用的,因此分享給大家學(xué)習(xí),希望大家閱讀完這篇文章后可以有所收獲,話不多說,跟著小編一起來看看吧。

代碼塊

html頁面:

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<title>rotate image</title>

</head>

<body>

<div class="polaroid rotate_left">

<img src="pulpitrock.jpg" alt="" width="284" height="213">

<p class="caption">The pulpit rock inLysefjorden,Norway.</p>

</div>

<div class="polaroid rotate_right">

<img src="cinqueterre.jpg" alt="" width="284" height="213">

<p class="caption">Monterosso al Mare. One of the five villages in Cinque Terre.</p>

</div>

</body>

</html>

css樣式:

<style type="text/css" media="screen">

body{

margin:30px;

background-color: #E9E9E9;

}

div.polaroid{

width: 294px;

padding: 10px 10px 20px 10px;

border:1px solid #BFBFBF;

background-color: #F0F8FF;

box-shadow: 4px 4px 6px #aaa;

border-radius: 5px;

}

div.rotate_left{

float: left;

-ms-transform:rotate(7deg);

-webkit-transform:rotate(7deg);

transform:rotate(7deg);

}

div.rotate_right{

float: left;

-ms-transform:rotate(-10deg);

-webkit-transform:rotate(-10deg);

transform:rotate(-10deg);

}

</style>

以上就是css3如何實現(xiàn)旋轉(zhuǎn)圖像,小編相信有部分知識點(diǎn)可能是我們?nèi)粘9ぷ鲿姷交蛴玫降?。希望你能通過這篇文章學(xué)到更多知識。更多詳情敬請關(guān)注億速云行業(yè)資訊頻道。

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI