zoukankan      html  css  js  c++  java
  • css---过渡天坑

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
            <style type="text/css">
                #test{
                     100px;
                    height: 100px;
                
                    border:3px solid red;
                    background: pink;
                    text-align: center;
                    font: 50px/200px "微软雅黑" ;
                    
                    position: absolute;
                    left: 0;
                    right: 0;
                    bottom: 0;
                    top: 0;
                    margin: auto;
                    transition-property: width;
                    transition-duration: 9s;
                     transition-timing-function: inherit;
                    
                }
                html{
                    height: 100%;
                }
                html body{
                      height: 60%;
                      border: 3px solid yellow;
                      margin-top: 100px;
                     
                }
                body:hover #test{
                    transition-property: height;    
                     200px;
                    height: 200px;
                
                }
                
            </style>
        </head>
        <body>
            <div id="test">
            
            </div>
        </body>
    </html>

    异步加载                                       确实没看懂这什么坑

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
            <style type="text/css">
                #test{
                     10px;
                    height: 10px;
                
                    border:3px solid red;
                    background: pink;
                    text-align: center;
                    font: 50px/200px "微软雅黑" ;
                    
                    position: absolute;
                    left: 0;
                    right: 0;
                    bottom: 0;
                    top: 0;
                    margin: auto;
                    transition-property: width;
                    transition-duration: 9s;
                     transition-timing-function: inherit;
                    
                }
                html{
                    height: 100%;
                }
                html body{
                      height: 60%;
                      border: 3px solid yellow;
                      margin-top: 100px;
                     
                }
             
                
            </style>
            <script type="text/javascript">
            
                //transition 在元素首次渲染还没有结束的情况下是不会触发的
                var tst=document.querySelector("#test");
                tst.style.width="300px";
            </script>
            
        </head>
        <body>
            <div id="test">
            
            </div>
        </body>
    </html>
    在元素首次渲染还没有结束的情况下是不会触发的
  • 相关阅读:
    服务部署 RPC vs RESTful
    模拟浏览器之从 Selenium 到splinter
    windows程序设计 vs2012 新建win32项目
    ubuntu python 安装numpy,scipy.pandas.....
    vmvare 将主机的文件复制到虚拟机系统中 安装WMware tools
    ubuntu 修改root密码
    python 定义类 简单使用
    python 定义函数 两个文件调用函数
    python 定义函数 调用函数
    python windows 安装gensim
  • 原文地址:https://www.cnblogs.com/hack-ing/p/11776750.html
Copyright © 2011-2022 走看看