zoukankan      html  css  js  c++  java
  • css卷叶效果

    <!DOCTYPE HTML>
    <html lang="en-US">
    <head>
    <meta charset="UTF-8">
    <title>22222</title>
    <style>

    .form{
    405px;
    height:200px;
    background:Yellow;
    position:relative;
    overflow:hidden;
    margin:30px auto;
    }
    .corner{
    background: -webkit-linear-gradient(45deg, #2e2e2e 24%, #5F5F5F 40%,#6f6f6f 43%,#5F5F5F 46%,#2F2F2F 50%,#fff 50%,#fff);

    90px;
    height:90px;
    border-radius: 0 0 0px 90px / 0 0 0 30px;
    -webkit-transform: rotate(-90deg);

    position: absolute;
    left:-4px;
    top: -4px;
    box-shadow: 5px 2px 8px black;
    overflow:hidden;
    -webkit-transition:all 0.3s linear 0s;

    }

    .corner:after{
    height:100%;
    100%;
    position: absolute;
    content: "56666666666";
    top: -15px;
    left: -82px;
    border-radius: 90px 90px 0px 0 / 40px 40px 0 0;
    z-index: 1;
    background: Blue;
    -webkit-transform: rotate(77deg);

    box-shadow: 0px 0px 8px black inset;
    }

    </style>
    </head>
    <body>
    <div class="page">
    <div class="form" id="form">
    <div class="corner" id="corner">
    </div>
    </div>
    </div>
    <script type="text/javascript">

    var form = document.getElementById("form");
    var corner = document.getElementById("corner")
    var ftop = form.offsetTop;
    var fleft = form.offsetLeft;
    var switchopen = 0;
    corner.onmousedown = function (e) {
    e.preventDefault();
    form.style.cursor = "move";
    switchopen = 1;
    }
    form.onmousemove = function (e) {
    if (switchopen == 1) {
    if (e.pageX - fleft > 90 || e.pageY - ftop > 90) {
    corner.style.width = corner.style.height = 90 + "px";
    corner.style.left = corner.style.top = -4 + "px"
    }
    else {
    corner.style.width = corner.style.height = e.pageY - ftop + "px";

    }
    }
    }
    form.onmouseup = function () {
    switchopen = 0;
    this.style.cursor = "default";
    }

    </script>
    </body>
    </html>

  • 相关阅读:
    re模块---正则表达式
    configparser 配置文件模块
    svn服务器配置
    python中的list的方法
    python正则表达式
    os模块
    高阶函数
    递归
    推导式
    [转]Java中的多线程你只要看这一篇就够了
  • 原文地址:https://www.cnblogs.com/zhwl/p/4347055.html
Copyright © 2011-2022 走看看