遮罩板,蒙板【前端组件】
来源:互联网 发布:autoit python 编辑:程序博客网 时间:2024/06/06 17:49
最近在写前端界面时,用到一个遮罩板,开始使用的是BootStrap上的遮罩板组建,但是后来发现BootStrap上的遮罩板封装得太彻底了,导致一些功能不能实现。于是自己根据网上的博客仿照着BootStrap的遮罩板写了一个遮罩板以后用,于是给大家分享一下。下面是代码,大家直接复制粘贴就可以使用了。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"rel="stylesheet">
<!-- 可选的Bootstrap主题文件(一般不使用) -->
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"></script>
<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<title>全屏div</title>
<style>
#back {
width:100%;
height:100%;
background-color:#000;
position:absolute;
top:0;
left:0;
z-index:2;
opacity:0.3;
display:none;
}
#log_window {
border-radius:6px;
width:45%;
height:50%;
background-color:#FFF;
margin:auto;
position:absolute;
z-index:3;
top: 0;
bottom:0;
left: 0;
right: 0;
display:none;
}
</style>
<script>
function shield(){
var s = document.getElementById("back");
s.style.display = "block";
var l = document.getElementById("log_window");
l.style.display = "block";
}
function cancel_shield(){
var s = document.getElementById("back");
s.style.display = "none";
var l = document.getElementById("log_window");
l.style.display = "none";
}
</script>
</head>
<body>
<a href="javascript:shield()">打开遮罩</a>
<div id="back"></div>
<div id="log_window">
<divstyle="height:5%;width:100%;">
<h3 align="center">遮罩窗体</h3>
</div>
<hr>
<divstyle="height:55%;width:100%;">
<table style="width:400px;"
class="table table-bordered table-hover"id="sample-table"
align="center">
<inputtype="hidden"name="dictionaryId_ud"id="dictionaryId_ud"/>
<trstyle="text-align:center;">
<td colspan="3">父类型</td>
<td colspan="3"><selectstyle="height:100%;width:60%"
name="faType_ud"id="faType_ud">
</select></td>
</tr>
<trstyle="text-align:center;">
<td colspan="3">数据类型</td>
<tdcolspan="3"><inputtype="text"name="dataType_ud"
id="dataType_ud"></td>
</tr>
<trstyle="text-align:center;">
<td colspan="3">数据值</td>
<tdcolspan="3"><inputtype="text"name="dataValue_ud"
id="dataValue_ud"></td>
</tr>
<trstyle="text-align:center;">
<td colspan="3">字典类型</td>
<tdcolspan="3"><inputtype="text"name="dictionaryType_ud"
id="dictionaryType_ud"></td>
</tr>
<trstyle="text-align:center;">
<td colspan="3">排序值</td>
<tdcolspan="3"><inputtype="text"name="orderValue_ud"
id="orderValue_ud"></td>
</tr>
</table>
</div>
<hr></hr>
<divstyle="height:20%;width:100%;">
<buttonstyle="float:right;margin-right:2%;"class="btn btn-primary">保存</button>
<buttonstyle="float:right;margin-right:1%;"class="btn btn-default"onclick="cancel_shield();">取消</button>
</div>
</div>
</body>
</html>
- 遮罩板,蒙板【前端组件】
- 前端优化&前端组件库
- 前端jQuery组件入门
- 谈谈前端组件库
- 学习Bootstrap前端组件
- 简易前端分页组件
- 前端组件库集合
- 前端上传组件Plupload
- 前端组件化思维
- 前端组件化(未完)
- 前端定位组件
- 前端组件化
- 前端组件化开发
- 前端弹出框组件
- 前端组件化
- 前端组件库
- 前端组件模块化
- 前端常用组件汇总
- POJ 3693 Maximum repetition substring 后缀数组求重复次数最多子串
- Makefile中的info函数
- Google的大规模集群管理系统Borg
- 【趣发现】区块链和云计算类型撞名了?
- 智链ChainNova携手IBM推出端到端区块链联合解决方案
- 遮罩板,蒙板【前端组件】
- Strom官网信息
- 百炼+日期转换+注意数组不能越界,免得re
- leetcode 123. Best Time to Buy and Sell Stock III 最大k次字段和 + DP
- css弹性动画效果
- 【牛客 题库】 char型变量值为1个字节长度,并从右侧开始运算 || abs返回值 || 函数模板
- 北大金融科技研究中心成立 智链 CEO 董宁担任中心主任
- java和安卓SMB创建文件夹
- 序列化(Serialization)的使用