当前位置:网站首页>H5, add a mask layer to the page, which is similar to clicking the upper right corner to open it in the browser
H5, add a mask layer to the page, which is similar to clicking the upper right corner to open it in the browser
2022-07-02 11:52:00 【System. out. print】
Code implementation , You can directly copy the generation html Document presentation
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.js"></script>
<title> mask </title>
</head>
<style>
.content{
width: 100%;
height: 100%;
background-color: red;
}
.show-mask-btn {
background: rgb(4, 208, 71);
padding: 5px 10px;
border-radius: 5px;
cursor: pointer;
}
.show-mask-btn p {
font-size: 12px;
font-weight: 400;
color: #ffffff;
}
.mask-box {
position: fixed;
min-height: 100vh;
background-color: rgba(0,0,0,.5);
opacity: 0.5;
display:none;
z-index: 999;
width: 100%;
}
.hint-txt {
width: 100%;
color: #ffffff;
text-align: center;
height: 35px;
line-height: 35px;
}
</style>
<body class="white-gradient-bg">
<!-- Mask / mask -->
<div class="mask-box" id="download-box">
<div class="hint-txt">1、 Click on the icon in the upper right corner </div>
<div class="hint-txt">2、 choice In the browser open </div>
</div>
<!-- Your content -->
<div class="content">
<div class="doshow-mask-btn" id="show-mask-btn">
<p> Click to view mask layer </p>
</div>
</div>
</body>
</html>
<script>
$('#show-mask-btn').click(function () {
$('.mask-box').css('display','block');
})
</script>Here are some things to pay attention to :
1、 mask div, Be sure to put it on the top of all elements . The following icon is an example of a red box

边栏推荐
- Fabric. JS 3 APIs to set canvas width and height
- ESP32 Arduino 引入LVGL 碰到的一些问题
- Thesis translation: 2022_ PACDNN: A phase-aware composite deep neural network for speech enhancement
- Cmake cross compilation
- HOW TO CREATE A BEAUTIFUL INTERACTIVE HEATMAP IN R
- 2022年4月17日五心红娘团队收获双份喜报
- Dynamic memory (advanced 4)
- PHP query distance according to longitude and latitude
- Fabric.js 3个api设置画布宽高
- 制造业数字化转型和精益生产什么关系
猜你喜欢

基于Hardhat和Openzeppelin开发可升级合约(二)

A sharp tool for exposing data inconsistencies -- a real-time verification system

可升级合约的原理-DelegateCall

Always report errors when connecting to MySQL database

Compilation errors and printout garbled problems caused by Chinese content in vs2019 code

亚马逊云科技 Community Builder 申请窗口开启

Is the Ren domain name valuable? Is it worth investing? What is the application scope of Ren domain name?

Tidb DM alarm DM_ sync_ process_ exists_ with_ Error troubleshooting

基于Hardhat和Openzeppelin开发可升级合约(一)

HOW TO CREATE A BEAUTIFUL INTERACTIVE HEATMAP IN R
随机推荐
基于Hardhat和Openzeppelin开发可升级合约(一)
File operation (detailed!)
念念不忘,必有回响 | 悬镜诚邀您参与OpenSCA用户有奖调研
How to Add P-Values onto Horizontal GGPLOTS
Redis exceeds the maximum memory error oom command not allowed when used memory & gt; ' maxmemory'
Tiktok overseas tiktok: finalizing the final data security agreement with Biden government
How to Add P-Values onto Horizontal GGPLOTS
mysql链表数据存储查询排序问题
可升级合约的原理-DelegateCall
YYGH-BUG-04
Mish-撼动深度学习ReLU激活函数的新继任者
[multithreading] the main thread waits for the sub thread to finish executing, and records the way to execute and obtain the execution result (with annotated code and no pit)
HOW TO CREATE AN INTERACTIVE CORRELATION MATRIX HEATMAP IN R
PHP 2D and multidimensional arrays are out of order, PHP_ PHP scrambles a simple example of a two-dimensional array and a multi-dimensional array. The shuffle function in PHP can only scramble one-dim
Bedtools tutorial
QT获取某个日期是第几周
A sharp tool for exposing data inconsistencies -- a real-time verification system
Summary of flutter problems
TDSQL|就业难?腾讯云数据库微认证来帮你
2022年遭“挤爆”的三款透明LED显示屏