Home Web Front-end JS Tutorial js实现登陆遮罩效果的方法_javascript技巧

js实现登陆遮罩效果的方法_javascript技巧

May 16, 2016 pm 03:48 PM
js Login Mask effect

本文实例讲述了js实现登陆遮罩效果的方法。分享给大家供大家参考。具体如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>遮罩</title>
<style>
 #blanks{
  display:none;
  width:100%;
  //height:100%;
  height:100px;
  position:absolute;
  top:0;
  background-color:#ccc;
  z-index:1000;
  -moz-opacity: 0.7; 
  opacity:.70; 
  filter: alpha(opacity=70);
 }
 #login{
  padding:18px;
  display:none;
  background-color:pink;
  width:300px;
  height:100px;
  position:absolute;
  left:400px;
  top:20%;
  z-index:1001;
 }
</style>
</head>
<body onload="setHeight()">
  <div id="content">
   <input type="button" value="登陆" onclick="showLogin()">
   <p>《人生》前15年左右都是些教学关卡,弱弱的,你还没法点“跳过”。
   作为一个初来乍到的新手,你有大把的时间和用不完的精力,但几乎毫无经验。你会发现游戏的大多数元素,
   像什么牛逼的工作啦,财富啦,伴侣啦都还没有解锁,一直到你真正拥有了它们。
   这段时间,你的技能升级得非常快。在之后的游戏中,你再也不可能像这个阶段一样时间充裕而且精力充沛。
   如果想要玩出水平,最重要的是要把时间安排得尽可能合理。你的任何一个行动都会改变你的状态和技能
   </p>
   <p>《人生》前15年左右都是些教学关卡,弱弱的,你还没法点“跳过”。
   作为一个初来乍到的新手,你有大把的时间和用不完的精力,但几乎毫无经验。你会发现游戏的大多数元素,
   像什么牛逼的工作啦,财富啦,伴侣啦都还没有解锁,一直到你真正拥有了它们。
   这段时间,你的技能升级得非常快。在之后的游戏中,你再也不可能像这个阶段一样时间充裕而且精力充沛。
   如果想要玩出水平,最重要的是要把时间安排得尽可能合理。你的任何一个行动都会改变你的状态和技能
   </p>
   <p>《人生》前15年左右都是些教学关卡,弱弱的,你还没法点“跳过”。
   作为一个初来乍到的新手,你有大把的时间和用不完的精力,但几乎毫无经验。你会发现游戏的大多数元素,
   像什么牛逼的工作啦,财富啦,伴侣啦都还没有解锁,一直到你真正拥有了它们。
   这段时间,你的技能升级得非常快。在之后的游戏中,你再也不可能像这个阶段一样时间充裕而且精力充沛。
   如果想要玩出水平,最重要的是要把时间安排得尽可能合理。你的任何一个行动都会改变你的状态和技能
   </p>
   <p>《人生》前15年左右都是些教学关卡,弱弱的,你还没法点“跳过”。
   作为一个初来乍到的新手,你有大把的时间和用不完的精力,但几乎毫无经验。你会发现游戏的大多数元素,
   像什么牛逼的工作啦,财富啦,伴侣啦都还没有解锁,一直到你真正拥有了它们。
   这段时间,你的技能升级得非常快。在之后的游戏中,你再也不可能像这个阶段一样时间充裕而且精力充沛。
   如果想要玩出水平,最重要的是要把时间安排得尽可能合理。你的任何一个行动都会改变你的状态和技能
   </p>
   <p>《人生》前15年左右都是些教学关卡,弱弱的,你还没法点“跳过”。
   作为一个初来乍到的新手,你有大把的时间和用不完的精力,但几乎毫无经验。你会发现游戏的大多数元素,
   像什么牛逼的工作啦,财富啦,伴侣啦都还没有解锁,一直到你真正拥有了它们。
   这段时间,你的技能升级得非常快。在之后的游戏中,你再也不可能像这个阶段一样时间充裕而且精力充沛。
   如果想要玩出水平,最重要的是要把时间安排得尽可能合理。你的任何一个行动都会改变你的状态和技能
   </p>
   <p>《人生》前15年左右都是些教学关卡,弱弱的,你还没法点“跳过”。
   作为一个初来乍到的新手,你有大把的时间和用不完的精力,但几乎毫无经验。你会发现游戏的大多数元素,
   像什么牛逼的工作啦,财富啦,伴侣啦都还没有解锁,一直到你真正拥有了它们。
   这段时间,你的技能升级得非常快。在之后的游戏中,你再也不可能像这个阶段一样时间充裕而且精力充沛。
   如果想要玩出水平,最重要的是要把时间安排得尽可能合理。你的任何一个行动都会改变你的状态和技能
   </p>
   <p>《人生》前15年左右都是些教学关卡,弱弱的,你还没法点“跳过”。
   作为一个初来乍到的新手,你有大把的时间和用不完的精力,但几乎毫无经验。你会发现游戏的大多数元素,
   像什么牛逼的工作啦,财富啦,伴侣啦都还没有解锁,一直到你真正拥有了它们。
   这段时间,你的技能升级得非常快。在之后的游戏中,你再也不可能像这个阶段一样时间充裕而且精力充沛。
   如果想要玩出水平,最重要的是要把时间安排得尽可能合理。你的任何一个行动都会改变你的状态和技能
   </p>
   <p>《人生》前15年左右都是些教学关卡,弱弱的,你还没法点“跳过”。
   作为一个初来乍到的新手,你有大把的时间和用不完的精力,但几乎毫无经验。你会发现游戏的大多数元素,
   像什么牛逼的工作啦,财富啦,伴侣啦都还没有解锁,一直到你真正拥有了它们。
   这段时间,你的技能升级得非常快。在之后的游戏中,你再也不可能像这个阶段一样时间充裕而且精力充沛。
   如果想要玩出水平,最重要的是要把时间安排得尽可能合理。你的任何一个行动都会改变你的状态和技能
   </p>
   <p>《人生》前15年左右都是些教学关卡,弱弱的,你还没法点“跳过”。
   作为一个初来乍到的新手,你有大把的时间和用不完的精力,但几乎毫无经验。你会发现游戏的大多数元素,
   像什么牛逼的工作啦,财富啦,伴侣啦都还没有解锁,一直到你真正拥有了它们。
   这段时间,你的技能升级得非常快。在之后的游戏中,你再也不可能像这个阶段一样时间充裕而且精力充沛。
   如果想要玩出水平,最重要的是要把时间安排得尽可能合理。你的任何一个行动都会改变你的状态和技能
   </p>
   <p>《人生》前15年左右都是些教学关卡,弱弱的,你还没法点“跳过”。
   作为一个初来乍到的新手,你有大把的时间和用不完的精力,但几乎毫无经验。你会发现游戏的大多数元素,
   像什么牛逼的工作啦,财富啦,伴侣啦都还没有解锁,一直到你真正拥有了它们。
   这段时间,你的技能升级得非常快。在之后的游戏中,你再也不可能像这个阶段一样时间充裕而且精力充沛。
   如果想要玩出水平,最重要的是要把时间安排得尽可能合理。你的任何一个行动都会改变你的状态和技能
   </p>
   <p>《人生》前15年左右都是些教学关卡,弱弱的,你还没法点“跳过”。
   作为一个初来乍到的新手,你有大把的时间和用不完的精力,但几乎毫无经验。你会发现游戏的大多数元素,
   像什么牛逼的工作啦,财富啦,伴侣啦都还没有解锁,一直到你真正拥有了它们。
   这段时间,你的技能升级得非常快。在之后的游戏中,你再也不可能像这个阶段一样时间充裕而且精力充沛。
   如果想要玩出水平,最重要的是要把时间安排得尽可能合理。你的任何一个行动都会改变你的状态和技能
   </p>
   <p>《人生》前15年左右都是些教学关卡,弱弱的,你还没法点“跳过”。
   作为一个初来乍到的新手,你有大把的时间和用不完的精力,但几乎毫无经验。你会发现游戏的大多数元素,
   像什么牛逼的工作啦,财富啦,伴侣啦都还没有解锁,一直到你真正拥有了它们。
   这段时间,你的技能升级得非常快。在之后的游戏中,你再也不可能像这个阶段一样时间充裕而且精力充沛。
   如果想要玩出水平,最重要的是要把时间安排得尽可能合理。你的任何一个行动都会改变你的状态和技能
   </p>
   <p>《人生》前15年左右都是些教学关卡,弱弱的,你还没法点“跳过”。
   作为一个初来乍到的新手,你有大把的时间和用不完的精力,但几乎毫无经验。你会发现游戏的大多数元素,
   像什么牛逼的工作啦,财富啦,伴侣啦都还没有解锁,一直到你真正拥有了它们。
   这段时间,你的技能升级得非常快。在之后的游戏中,你再也不可能像这个阶段一样时间充裕而且精力充沛。
   如果想要玩出水平,最重要的是要把时间安排得尽可能合理。你的任何一个行动都会改变你的状态和技能
   </p>
  </div>
  <div id="blanks"></div>
  <div id="login">
   <form method="post">
    用户名:<input type="text" name="username" ><br/>
    密  码:<input type="password" name="password"><br/>
     <input type="submit" value="提交">
   </form>
    <div id="btnclose" style="position:absolute;left:93%;top:0%;z-index:5;">
     <img  src="/static/imghw/default1.png"  data-src="close.png"  class="lazy" onclick="hidediv();"/ alt="js实现登陆遮罩效果的方法_javascript技巧" >
    </div>
  </div>
</body>
</html>
<script type="text/javascript">
 function setHeight()
 {
  var h=document.documentElement.scrollHeight;
  document.getElementById("blanks").style.height=h+"px";
 }
 function hidediv()
 {
  document.getElementById("login").style.display="none";
  document.getElementById("blanks").style.display="none";
 }
 function showLogin()
 {
  document.getElementById("login").style.display="block";
  document.getElementById("blanks").style.display="block";
 }
</script>

Copy after login

希望本文所述对大家的javascript程序设计有所帮助。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PlayStation network login fails, but internet connection succeeds PlayStation network login fails, but internet connection succeeds Feb 19, 2024 pm 11:33 PM

Some players are experiencing a strange issue on PS4 or PS5 at launch. For example, this can cause distress when their PlayStation Network login fails, but their internet connection is fine. You may encounter errors when entering your login information and may not be able to join PSParty chat. If you encounter a similar problem, this guide may help you solve it. Next to PlayStationNetworkSign-in, you will see the error message ‘AnErrorHaveAreAre’ and it will say ‘Failure’. Other parameters like getting IP address, internet connection and connection speed were successful. So, what could be the problem here? I will give you a job

Fix AADSTS7000112, Application is disabled Microsoft account login error Fix AADSTS7000112, Application is disabled Microsoft account login error Feb 19, 2024 pm 06:27 PM

The AADSTS7000112 error may prevent you from logging into the app using your Microsoft account, causing you inconvenience. This article will provide you with solutions to help you resolve this issue and restore a normal login experience. Login: Sorry, you are having trouble logging in. AADSTS7000112: Application disabled. Fortunately, you can fix the error by following some simple suggestions. What is error code AADSTS7000112? Error code AADSTS7000112 indicates a problem with the connection to Microsoft's Azure Active Directory. Typically, this may be due to the Microsoft application trying to log in being blocked.

How to use JS and Baidu Maps to implement map pan function How to use JS and Baidu Maps to implement map pan function Nov 21, 2023 am 10:00 AM

How to use JS and Baidu Map to implement map pan function Baidu Map is a widely used map service platform, which is often used in web development to display geographical information, positioning and other functions. This article will introduce how to use JS and Baidu Map API to implement the map pan function, and provide specific code examples. 1. Preparation Before using Baidu Map API, you first need to apply for a developer account on Baidu Map Open Platform (http://lbsyun.baidu.com/) and create an application. Creation completed

Essential tools for stock analysis: Learn the steps to draw candle charts with PHP and JS Essential tools for stock analysis: Learn the steps to draw candle charts with PHP and JS Dec 17, 2023 pm 06:55 PM

Essential tools for stock analysis: Learn the steps to draw candle charts in PHP and JS. Specific code examples are required. With the rapid development of the Internet and technology, stock trading has become one of the important ways for many investors. Stock analysis is an important part of investor decision-making, and candle charts are widely used in technical analysis. Learning how to draw candle charts using PHP and JS will provide investors with more intuitive information to help them make better decisions. A candlestick chart is a technical chart that displays stock prices in the form of candlesticks. It shows the stock price

Recommended: Excellent JS open source face detection and recognition project Recommended: Excellent JS open source face detection and recognition project Apr 03, 2024 am 11:55 AM

Face detection and recognition technology is already a relatively mature and widely used technology. Currently, the most widely used Internet application language is JS. Implementing face detection and recognition on the Web front-end has advantages and disadvantages compared to back-end face recognition. Advantages include reducing network interaction and real-time recognition, which greatly shortens user waiting time and improves user experience; disadvantages include: being limited by model size, the accuracy is also limited. How to use js to implement face detection on the web? In order to implement face recognition on the Web, you need to be familiar with related programming languages ​​and technologies, such as JavaScript, HTML, CSS, WebRTC, etc. At the same time, you also need to master relevant computer vision and artificial intelligence technologies. It is worth noting that due to the design of the Web side

How to log in to corporate WeChat email How to log in to corporate WeChat email Mar 10, 2024 pm 12:43 PM

How to log in to the email address of Enterprise WeChat? You can log in to the email address in the Enterprise WeChat APP, but most users don’t know how to log in to the email address. Next is the graphic tutorial on how to log in to the email address of Enterprise WeChat brought by the editor for interested users. Come and take a look! Enterprise WeChat usage tutorial How to log in to the Enterprise WeChat email 1. First open the Enterprise WeChat APP, go to the [Workbench] at the bottom of the main page and click to come to the special area; 2. Then in the workbench area, select the [Enterprise Mailbox] service; 3. Then jump to the corporate email function page, click [Bind] or [Change Email] at the bottom; 4. Finally, enter [QQ Account] and [Password] on the page shown below to log in to the email.

How to create a stock candlestick chart using PHP and JS How to create a stock candlestick chart using PHP and JS Dec 17, 2023 am 08:08 AM

How to use PHP and JS to create a stock candle chart. A stock candle chart is a common technical analysis graphic in the stock market. It helps investors understand stocks more intuitively by drawing data such as the opening price, closing price, highest price and lowest price of the stock. price fluctuations. This article will teach you how to create stock candle charts using PHP and JS, with specific code examples. 1. Preparation Before starting, we need to prepare the following environment: 1. A server running PHP 2. A browser that supports HTML5 and Canvas 3

GeForce Experience login freezes [Fix] GeForce Experience login freezes [Fix] Mar 19, 2024 pm 06:30 PM

This article will guide you to solve the GeForceExperience login crash issue on Windows 11/10. Typically, this can be caused by unstable network connections, corrupted DNS cache, outdated or corrupted graphics card drivers, etc. Fix GeForceExperience Login Black Screen Before starting, make sure to restart your internet connection and computer. Sometimes, the problem may just be due to a temporary issue. If you are still experiencing NVIDIA GeForce Experience login black screen issue, please consider taking the following suggestions: Check your internet connection Switch to another internet connection Disable your

See all articles