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>
  • 相关阅读:
    《编程之美》
    Fx Composer2.5 在Win8.1下无法运行的解决方法
    纹理坐标的探讨
    随机取两个点 ( 容易犯错的 do while )
    X文件(待续)
    函数指针
    安装DirectX SDK时出现Error Code:s1023 的解决方案(转)
    光与材质
    视棱锥
    D3D支持的图元类型
  • 原文地址:https://www.cnblogs.com/mengxiao/p/6600541.html
Copyright © 2011-2022 走看看