zoukankan      html  css  js  c++  java
  • JQUERY DIV浮动提示信息

        function showTips(tips, height, time) {
    var windowWidth = document.documentElement.clientWidth;
    var tipsDiv = '<div class="tipsClass">' + tips + '</div>';

    $(
    'body').append(tipsDiv);
    $(
    'div.tipsClass').css({
    'top': height + 'px',
    'left': (windowWidth / 2) - (tips.length * 13 / 2) + 'px',
    'position': 'absolute',
    'padding': '3px 5px',
    'background': 'red',
    'font-size': 12 + 'px',
    'margin': '0 auto',
    'text-align': 'center',
    'width': 'auto',
    'color': '#fff',
    'opacity': '0.8'
    }).show();
    setTimeout(
    function () { $('div.tipsClass').fadeOut(); }, (time * 1000));
    }

      

  • 相关阅读:
    Redis
    Redis
    运维
    Redis
    Redis
    Redis
    Redis
    Redis
    Redis
    Spring
  • 原文地址:https://www.cnblogs.com/yannis/p/2175411.html
Copyright © 2011-2022 走看看