当前位置:网站首页>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
边栏推荐
- xss-labs-master靶场环境搭建与1-6关解题思路
- 6. Introduce you to LED soft film screen. LED soft film screen size | price | installation | application
- Liftover for genome coordinate conversion
- A sharp tool for exposing data inconsistencies -- a real-time verification system
- Take you ten days to easily finish the finale of go micro services (distributed transactions)
- Enter the top six! Boyun's sales ranking in China's cloud management software market continues to rise
- Bedtools tutorial
- C # method of obtaining a unique identification number (ID) based on the current time
- Writing contract test cases based on hardhat
- QT meter custom control
猜你喜欢
Develop scalable contracts based on hardhat and openzeppelin (II)
How to Easily Create Barplots with Error Bars in R
BEAUTIFUL GGPLOT VENN DIAGRAM WITH R
JS -- take a number randomly from the array every call, and it cannot be the same as the last time
Mish-撼动深度学习ReLU激活函数的新继任者
HOW TO EASILY CREATE BARPLOTS WITH ERROR BARS IN R
R HISTOGRAM EXAMPLE QUICK REFERENCE
可昇級合約的原理-DelegateCall
R HISTOGRAM EXAMPLE QUICK REFERENCE
vant tabs组件选中第一个下划线位置异常
随机推荐
进入前六!博云在中国云管理软件市场销量排行持续上升
Programmer growth Chapter 6: how to choose a company?
MySQL basic statement
Flesh-dect (media 2021) -- a viewpoint of material decomposition
qt 仪表自定义控件
2022年遭“挤爆”的三款透明LED显示屏
可昇級合約的原理-DelegateCall
YYGH-9-预约下单
QT meter custom control
Enter the top six! Boyun's sales ranking in China's cloud management software market continues to rise
Develop scalable contracts based on hardhat and openzeppelin (I)
6. Introduce you to LED soft film screen. LED soft film screen size | price | installation | application
Data analysis - Matplotlib sample code
Cmake cross compilation
Seriation in R: How to Optimally Order Objects in a Data Matrice
MySQL stored procedure cursor traversal result set
Seriation in R: How to Optimally Order Objects in a Data Matrice
On April 17, 2022, the five heart matchmaker team received double good news
Is it safe to open a stock account through the QR code of the securities manager? Or is it safe to open an account in a securities company?
Visualization of chip SEQ data by deeptools