zoukankan      html  css  js  c++  java
  • h5学习-css3的一些内容整理

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>css3变形功能 transform属性</title>
        <style type="text/css">
            div{
                width:300px;
                height: 300px;
                background-color:#000;
    
            }
            div:hover{
            /*-moz-transform: rotate(45deg); 旋转*/
            /*-moz-transform: scale(2,2); 缩放,不能设置为负值,可以设置小数 0.5*/
            /*-moz-transform: skew(30deg);倾斜*/
            /*-moz-transform: translate(50px);移动*/
        }
    </style>
    </head>
    
    <body>
    <h1>rotate旋转</h1>
    <div></div>
    </body>
    </html>
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>css动画功能</title>
        <style type="text/css">
            div{
                width:200px;
                height: 200px;
                background-color: aqua;
                -moz-transition:all 1s linear;
            }
            div:hover{
               background-color: #e54d26;
                width: 400px;
                height: 400px;
            }
    
        </style>
    </head>
    <body>
    <div></div>
    </body>
    </html>
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>css3 animation属性的使用</title>
        <style>
            div{
               width: 10px;
                height: 20px;
                background-color: aquamarine;
            }
          /*  关键帧的定义*/
            @-webkit-keyframes mycolor {
                0%{
                    background-color: #D2D2D2;
                }
                10%{
                    background-color: #646464;
                    width: 10px;
                }
                20%{
                    background-color: aqua;
                    width:20px ;
                }
                80%{
                    background-color: #e54d26;
                    width: 80px;
                }
                100%{
                    background-color: blueviolet;
                    width: 100px;
                }
            }
    
            div:hover{
                -webkit-animation-name: mycolor;
                -webkit-animation-duration: 5s;
                -webkit-animation-timing-function: linear;
                -moz-animation-iteration-count:1;
            }
        </style>
    </head>
    <body>
    <div></div>
    </body>
    </html>
  • 相关阅读:
    WKWebView加载显示问题
    获取iOS设备信息(内存/电量/容量/型号/IP地址/当前WIFI名称)
    iOS scrollsToTop
    iOSNSTimer 后台运行
    iOS监听home,进入后台
    iOS 模拟器改变定位地点的两种方法
    iOS 系统定位具体到省市区街道
    iOS 中的 HotFix 方案总结详解
    iOS 10 :用 UIViewPropertyAnimator 编写动画
    iOS中常见 Crash 及解决方案
  • 原文地址:https://www.cnblogs.com/mengxiao/p/6600541.html
Copyright © 2011-2022 走看看