最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

jquery實(shí)現(xiàn)加載更多"轉(zhuǎn)圈圈"效果(示例代碼)

 更新時(shí)間:2020年11月09日 15:57:58   作者:智慧女孩要禿頭~  
這篇文章主要介紹了jquery實(shí)現(xiàn)加載更多"轉(zhuǎn)圈圈"效果,本文通過(guò)實(shí)例代碼給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下

功能:發(fā)送網(wǎng)絡(luò)請(qǐng)求時(shí)等待加載的圈圈動(dòng)態(tài)顯示,網(wǎng)絡(luò)請(qǐng)求成功后關(guān)閉提示圈圈
代碼:
index.html

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>css畫(huà)動(dòng)態(tài)等待轉(zhuǎn)圈效果</title>
  <link rel="stylesheet" href="public/index.css" rel="external nofollow" >
</head>
<style type="text/css">
 .toast {
  display: none;
  position: fixed;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 18rem;
  height: 18rem;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background-color: #4A4A4B;
  border-radius: 1rem;
  color: #f0f0f0;
  font-size: 2.5rem;
 }
 .load {
  display: inline-block;
  margin-bottom: 1.5rem;
  height: 4rem;
  width: 4rem;
  border: 0.4rem solid transparent;
  border-top-color: white;
  border-left-color: white;
  border-bottom-color: white;
  animation: circle 1s infinite linear;
  -webkit-animation: circle 1s infinite linear; /* Safari 和 Chrome */
  border-radius: 50%
 }

 @-webkit-keyframes circle {
  0% {
   transform: rotate(0deg);
  }
  100% {
   transform: rotate(-360deg)
  }
 }
</style>

<body>

<div class="toast">
  <span class="load"></span>
  <span>加載中...</span>
</div>

<script src="public/jquery.min.js"></script>
<script>
 $(function () {
  $('.toast').css({display: 'flex'})
  //這里可以寫(xiě)網(wǎng)絡(luò)請(qǐng)求代碼...
  $.ajax({
   url: '/api/login',
   type: 'POST',
   data: {username: '111'},
   dataType: 'json',
   success: function (data) {//請(qǐng)求成功則關(guān)閉圈圈
    $('.toast').css({display: 'none'})
   },
   error: function (e) {
    console.log(e)
   }
  })

 });
</script>

</body>
</html>

效果:

在這里插入圖片描述

到此這篇關(guān)于jquery實(shí)現(xiàn)加載更多“轉(zhuǎn)圈圈“效果的文章就介紹到這了,更多相關(guān)jquery加載更多轉(zhuǎn)圈圈內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評(píng)論

汉川市| 通山县| 江城| 西乌珠穆沁旗| 德清县| 丁青县| 奉节县| 湖北省| 蛟河市| 斗六市| 永定县| 邮箱| 长武县| 壤塘县| 漾濞| 宁乡县| 逊克县| 绵竹市| 出国| 东港市| 五华县| 辛集市| 诸暨市| 嘉定区| 五台县| 台安县| 双鸭山市| 蚌埠市| 浏阳市| 南靖县| 太湖县| 旬阳县| 从化市| 福州市| 西乌珠穆沁旗| 盐亭县| 石河子市| 江华| 江津市| 安福县| 临桂县|