第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

為關(guān)閉模態(tài)窗口啟用向下滑動(dòng)動(dòng)畫

為關(guān)閉模態(tài)窗口啟用向下滑動(dòng)動(dòng)畫

慕工程0101907 2021-09-30 09:33:10
我使用 html、css 和 JavaScript 創(chuàng)建了一個(gè)模態(tài),其代碼包含在片段中。你會(huì)注意到當(dāng)一個(gè)模態(tài)窗口打開(kāi)時(shí),它有一個(gè)從頂部滑動(dòng)的動(dòng)畫。我想讓模態(tài)窗口在關(guān)閉時(shí)具有滑動(dòng)到底部的動(dòng)畫(而不是在其位置時(shí)立即消失)有人可以調(diào)整代碼以達(dá)到預(yù)期的效果嗎?提前致謝!let open_modals = [];(function() {  // Get the button that opens the modal  // read all the control of any type which has class as modal-button  var btn = document.querySelectorAll(".modal-button");  // All page modals  var modals = document.querySelectorAll('.modal');  // Get the <span> element that closes the modal  var spans = document.getElementsByClassName("close");  // When the user clicks the button, open the modal  for (var i = 0; i < btn.length; i++) {    btn[i].onclick = function(e) {      e.preventDefault();      modal = document.querySelector(e.target.getAttribute("href"));      modal.style.display = "block";      open_modals.push(modal.id);    }  }  // When the user clicks on <span> (x), close the modal  for (var i = 0; i < spans.length; i++) {    spans[i].onclick = function() {      for (var index in modals) {        if (typeof modals[index].style !== 'undefined' && modals[index].id == open_modals[open_modals.length - 1]) {          modals[index].style.display = "none";          open_modals.pop();        }      }    }}})();
查看完整描述

3 回答

  • 3 回答
  • 0 關(guān)注
  • 196 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)