摘要:效果圖如下代碼如下遮蓋層主頁(yè)面模態(tài)框
DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Testtitle>
<style>
#pageMask {
visibility: hidden;
position: absolute;
left: 0px;
top: 0px;
width:100%;
height:100%;
text-align: center;
z-index: 1100;
background-color: #333;
opacity: 0.6;
}
#ModalBody{
background: white;
width: 50% !important;
height: 50% !important;
position:absolute;
left: 25%;
top: 25%;
z-index: 1101;
border: 1px solid;
display: none;
}
#closeModalBtn{
position: static;
margin-top: 5px;
margin-right: 1%;
float: right;
font-size: 14px;
background: #ccc0;
cursor: pointer;
}
style>
head>
<body>
<div class="content">
<h1>Test Modalh1>
<div id="pageMask">div>
<button class="showModalBtn" id="showModalBtn">Btnbutton>
<div>
Page Content...
div>
div>
<div id="ModalBody">
<button id="closeModalBtn" style="display: none;">Closebutton>
<div>Test Modal Body...div>
div>
<script>
window.onload = function(){
expandIframe();
}
function expandIframe(){
var mask = document.getElementById("pageMask");
var modal = document.getElementById("ModalBody");
var closeBtn = document.getElementById("closeModalBtn");
var btn = document.getElementById("showModalBtn");
btn.onclick = function(){
modal.style.display = (modal.style.display == "block")? "none" : "block";
closeBtn.style.display = (closeBtn.style.display == "block")? "none" : "block";
mask.style.visibility = (mask.style.visibility == "visible")? "hidden" : "visible";
}
closeBtn.onclick = function(){
modal.style.display = (modal.style.display == "block")? "none" : "block";
closeBtn.style.display = (closeBtn.style.display == "block")? "none" : "block";
mask.style.visibility = (mask.style.visibility == "visible")? "hidden" : "visible";
}
}
script>
body>
html>
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://specialneedsforspecialkids.com/yun/2239.html
摘要:提供唯一的方法配置。即文件名,在同一個(gè)頁(yè)面有多個(gè)不同業(yè)務(wù)的模態(tài)框的情況下很方便點(diǎn)擊確認(rèn)按鈕執(zhí)行的代碼可以從中獲取和字段進(jìn)一步操作發(fā)起請(qǐng)求等點(diǎn)擊取消按鈕執(zhí)行的代碼 ui.bootstrap的modal組件可以很方便地實(shí)現(xiàn)頁(yè)面controller與模態(tài)框controller之間通信,特別是彈出的模態(tài)框中有比較復(fù)雜的表格信息需要用戶填寫,下面切入主題: 注冊(cè)全局模態(tài)框?qū)嵗腸ontrolle...
摘要:哈哈哈哈中信營(yíng)業(yè)廳高堯三漢中門分店會(huì)員有效期取消確定哈哈哈哈中信營(yíng)業(yè)廳高堯三漢中門分店會(huì)員有效期取消確定DOCTYPE html> Document body { background-color: #000000; } ul, li { list-style: none; padding: 0; margin: 0; } .div1 { position: fixed; lef...
摘要:組件結(jié)構(gòu)頭部?jī)?nèi)容區(qū)域尾部操作按鈕模態(tài)框結(jié)構(gòu)分為三部分,分別為頭部?jī)?nèi)部區(qū)域和操作區(qū)域,都提供了,可以根據(jù)需要定制。調(diào)用點(diǎn)擊確定按鈕的回調(diào)處理點(diǎn)擊取消按鈕的回調(diào)處理用創(chuàng)建一個(gè)索引就很方便拿到模態(tài)框組件內(nèi)部的方法了。 基本上每個(gè)項(xiàng)目都需要用到模態(tài)框組件,由于在最近的項(xiàng)目中,alert組件和confirm是兩套完全不一樣的設(shè)計(jì),所以我將他們分成了兩個(gè)組件,本文主要討論的是confirm組件的實(shí)...
閱讀 576·2023-04-26 01:42
閱讀 3222·2021-11-22 11:56
閱讀 2392·2021-10-08 10:04
閱讀 836·2021-09-24 10:37
閱讀 3125·2019-08-30 15:52
閱讀 1732·2019-08-29 13:44
閱讀 472·2019-08-28 17:51
閱讀 2141·2019-08-26 18:26