本文實例為大家分享了js滑動提示效果,供大家參考,具體內容如下
js代碼漂亮的動畫效果;在靠右上角:背景顏色為紅,字體顏色為白色  滑動 變大 上移  緩慢漸變消失
function tishi() {  $("#tishi").attr("style", "border: 1px solid #000;position: absolute; z-index: 10; width:200px; height: 30px;color:white;background-color:Red;border-radius:25px;-moz-border-radius:25px; text-align:center;left:70%; top:10%; display: none");  $("#tishi").show().animate({  width: '300px',  height: '37px',  top: '-=10px'  , opacity: '0.8'  }, "slow");  $("#tishi").show().animate({  top: '-=10px'  , opacity: '0.6'  }, "slow");  $("#tishi").show().animate({  top: '-=10px'  , opacity: '0.4'  }, "slow");  $("#tishi").show().animate({  top: '-=10px'  , opacity: '0.2'  }, "slow");  $("#tishi").show().animate({  top: '-=10px'  , opacity: '0.0'  }, "slow"); }前臺代碼,寫在body里:
<div id="tishi" style="border: 1px solid #000;position: absolute; z-index: 10; width:200px; height: 30px;color:white;background-color:Red;border-radius:25px; -moz-border-radius:25px; /* 老的 Firefox */text-align:center;left:70%; top: 10%; display: none">請完善信息</div>
希望本文所述對大家學習javascript程序設計有所幫助。
新聞熱點
疑難解答