zoukankan      html  css  js  c++  java
  • 清除浮动

    推荐基础前端学习地址https://ke.qq.com/course/315961蝉壳学院

    清除浮动

    .clearfix:before,.clearfix:after{
        content: "";
        display: table;
        }
    .clearfix:after{
        content: "";
        display: block;
        height: 0;
        clear: both;
        visibility: hidden;
        overflow: hidden;
    }
    .clearfix{
       *zoom: 1;
    }

    缺点:ie6;7,不支持 :after;使用zoom:1;触发haslayout

    网页图标

    <link rel="shortcut icon" href="img/bg-timg2.jpg" type="image/x-icon" />

    div居中

    .wrapper {
        position: absolute;
        top: 50%;
        left: 50%;
        margin-top: -250px;//div的高度的一半
        margin-left: -200px;//div的宽度的一半
        width: 500px;
        height: 400px;
        background: #fff;
        border-radius:20px;
        overflow: hidden;
    }

    z-index: 10;//层级

    //转换数组
    oSpan = Array.prototype.slice.call(document.getElementsByTagName("span")),
    
    //委托绑定元素事件
    oUl.addEventListener('click', function (e) {
        var target = e.target;
        if(target.nodeName == 'LI'){
            oCard.style.left = '100%';
            oActive.innerHTML = target.innerHTML;
            oActive.classList.remove('active');
        }
    })

    demo地址https://pan.baidu.com/s/1VX6zgDaud5qjjlvYgCL3eQ     提取码:r5l6

  • 相关阅读:
    关于发布版本号管理
    WWF
    C#编码规范和命名规则
    使用正则表达式更改编译版本号
    .net2005登录控件
    读取web.config自定义配置节
    在SQL SERVER 2005 中使用XML
    CVSNT用户权限配置
    共享鼠标
    《Ajax基础教程》
  • 原文地址:https://www.cnblogs.com/shuaimeng/p/9923425.html
Copyright © 2011-2022 走看看