js滑動提示效果代碼分享,js滑動代碼分享

來源:互聯網
上載者:User

js滑動提示效果代碼分享,js滑動代碼分享

本文執行個體為大家分享了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程式設計有所協助。

您可能感興趣的文章:
  • javascript 仿QQ滑動菜單效果代碼
  • 部落格側邊欄模組跟隨捲軸滑動固定效果的實現方法(js+jquery等)
  • Javascript實現滑塊滑動改變值的實現代碼
  • Chrome擴充頁面動態綁定JS事件提示錯誤
  • js通過更改按鈕的顯示樣式實現按鈕的滑動效果
  • 原生javascript模仿win8等待提示圓圈進度條
  • js判斷橫豎屏及禁止瀏覽器滑動條樣本
  • 離開當前頁面前使用js判斷條件提示是否要離開頁面
  • 使用原生js封裝webapp滑動效果(慣性滑動、滑動回彈)
  • js實現touch移動觸屏滑動事件

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.