当前位置:网站首页>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
边栏推荐
- QT获取某个日期是第几周
- YYGH-9-预约下单
- Wechat applet uses Baidu API to achieve plant recognition
- Implementation of address book (file version)
- Digital transformation takes the lead to resume production and work, and online and offline full integration rebuilds business logic
- 时间格式化显示
- Cluster Analysis in R Simplified and Enhanced
- 进入前六!博云在中国云管理软件市场销量排行持续上升
- How to Create a Beautiful Plots in R with Summary Statistics Labels
- Principe du contrat évolutif - delegatecall
猜你喜欢
HOW TO CREATE A BEAUTIFUL INTERACTIVE HEATMAP IN R
PYQT5+openCV项目实战:微循环仪图片、视频记录和人工对比软件(附源码)
动态内存(进阶四)
【2022 ACTF-wp】
亚马逊云科技 Community Builder 申请窗口开启
Cluster Analysis in R Simplified and Enhanced
YYGH-BUG-05
Esp32 audio frame esp-adf add key peripheral process code tracking
HOW TO CREATE AN INTERACTIVE CORRELATION MATRIX HEATMAP IN R
What is the relationship between digital transformation of manufacturing industry and lean production
随机推荐
GGHIGHLIGHT: EASY WAY TO HIGHLIGHT A GGPLOT IN R
php 根据经纬度查询距离
pgsql 字符串转数组关联其他表,匹配 拼接后原顺序展示
2022年4月17日五心红娘团队收获双份喜报
Beautiful and intelligent, Haval H6 supreme+ makes Yuanxiao travel safer
C # method of obtaining a unique identification number (ID) based on the current time
Astparser parsing class files with enum enumeration methods
to_bytes与from_bytes简单示例
Homer预测motif
抖音海外版TikTok:正与拜登政府敲定最终数据安全协议
K-Means Clustering Visualization in R: Step By Step Guide
Thesis translation: 2022_ PACDNN: A phase-aware composite deep neural network for speech enhancement
PX4 Position_ Control RC_ Remoter import
RPA进阶(二)Uipath应用实践
多文件程序X32dbg动态调试
FLESH-DECT(MedIA 2021)——一个material decomposition的观点
What is the relationship between digital transformation of manufacturing industry and lean production
How to Add P-Values onto Horizontal GGPLOTS
HOW TO ADD P-VALUES ONTO A GROUPED GGPLOT USING THE GGPUBR R PACKAGE
Seriation in R: How to Optimally Order Objects in a Data Matrice