• html提示模板


    <div class="remind">&nbsp;</div>
    <div class="corner">&nbsp;</div>
    <style>
        .remind{
        box-shadow: rgb(136, 136, 136) 0px 0px 6px;
        right: auto;
        left: 935px;
        top: 423px;
        z-index: 19001;
        position: absolute;
        border: 1px solid #f5f5f5;
        background-color: #000;
        opacity: 0.7;
        color:#fff;
        border-radius:11px;
        display: none;
    }
      .remind  li{
          margin: 10px;
      }
    .corner {
         0;
        height: 0;
        border-right: 10px solid #fff;
        border-left: 10px solid #fff;
        border-top: 10px solid #000;
        opacity: 0.7;
        position: absolute;
        z-index: 19001;
        left: 935px;
        top: 423px;
        display: none;
    }
    </style>
    <script type="text/javascript">// <![CDATA[
    function remindClose(){
         $(".remind").css("display","none");
         $(".corner").css("display","none");
    }
    function clearRemind(){
        $(".remind").html("<ul>");
    }
    function addRemind(content){
        var  liHtml = '<li>'+content+'</li>';
        $(".remind").append(liHtml);
    }
    function remindShow(){
        $(".remind").append("</ul>");
        $(".remind").css("display","block");
        $(".corner").css("display","block");
    }
    /*
        @param e 传事件参数,可以获取鼠标坐标 e.pageX/e.pageY
        @parma _this  传对象参数,可以获取对象所在坐标点位
    */
    function addFirstRemind(e,_this){
        clearRemind();
        addRemind("1、撒多好记SD卡华盛顿卡");
        addRemind("2、撒多好记SD卡华盛顿卡");
        addRemind("3、撒多好记SD卡华盛顿卡");
        addRemind("4、撒多好记SD卡华盛顿卡");
        addRemind("5、撒多好记SD卡华盛顿卡");
        //获取模板宽度,高度
        var h = $(".remind").height();
        var w = $(".remind").width();
        //获取元素的坐标点
        var v = $(_this).offset();
        $(".remind").css("left",v.left - w/2);
        $(".remind").css("top",v.top - h - 13);
        $(".corner").css("left",v.left - 10);
        $(".corner").css("top",v.top - 13);
        remindShow();
    }
    </script>
  • 相关阅读:
    页面性能:如何系统地优化页面?
    为什么CSS动画比JavaScript高效?
    Code Review
    浏览器中的页面之CSS是如何影响到渲染流程的
    async / await
    手撸Promise
    Promise
    宏任务和微任务
    有点恶心,随手写点儿
    关于判断用户输入的是不是int类型,这次没有正则表达式
  • 原文地址:https://www.cnblogs.com/zf-crazy/p/14975199.html
Copyright © 2020-2023  润新知