HTML连载69-透视属性以及其他属性练习

一、透视属性
1.什么是透视
透视简单来说就是近大远小
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>

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-1IpVXpHa-1582128798600)(https://www.cnblogs.com/ruigege0000/p/12334018.html)]

三、源码:
D171_PerspectiveAttribute.html
D172_PerspectiveExercise.html
地址:
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大数据学习视频礼包
69.1

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值