HTML連載69-透視屬性以及其餘屬性練習

1、透視屬性html

1.什麼是透視git

透視簡單來講就是近大遠小github

2.​注意點:必定要注意,透視屬性必須添加到須要呈現近大遠小效果的​元素的父元素。微信

3.​格式:perspective:數字px;學習

這裏的數字表明透視的大小距離。大數據

 

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <title>D172_PerspectiveExercise</title>

    <style>

        *{

            margin:0px;

            padding:0px;

        }

        div{

            width: 500px;

            height: 750px;

            border:1px solid black;

            margin:100px auto;

            background-color: skyblue;

            perspective: 500px;

        }

        div img{/*修改形變中心點,不然旋轉的中心不對*/

            transform-origin:center bottom;

            transition:transform 1s;

        }

        div:hover img{

            transform:rotateX(45deg);}

</style>

</head>

<body>

<div>

    <img src="image/play_tennis.jpg" alt="">

</div>

</body>

</html>

 

3、源碼:ui

D171_PerspectiveAttribute.htmlspa

D172_PerspectiveExercise.html.net

地址:code

https://github.com/ruigege66/HTML_learning/blob/master/D171_PerspectiveAttribute.html

https://github.com/ruigege66/HTML_learning/blob/master/D172_PerspectiveExercise.html

2.CSDN:https://blog.csdn.net/weixin_44630050

3.博客園:https://www.cnblogs.com/ruigege0000/

4.歡迎關注微信公衆號:傅里葉變換,我的帳號,僅用於技術交流,後臺回覆「禮包」獲取Java大數據學習視頻禮包

 

相關文章
相關標籤/搜索