js实现非常棒的弹出div
网络编程 2021-07-04 20:00www.168986.cn编程入门
这篇文章主要为大家详细介绍了js实现非常棒的弹出div,具有一定的参考价值,感兴趣的朋友可以参考一下
本文实例为大家分享了一个非常棒的弹出div,供大家参考,具体内容如下
<html> <head> <meta charset="utf-8" /> <title>LIGHTBOX EXAMPLE</title> <style> .black_overlay{ display: none; position: absolute; : 0%; left: 0%; width: 100%; height: 100%; background-color: black; z-index:1001; -moz-opacity: 0.6; opacity:.60; filter: alpha(opacity=60); } .white_content { display: none; position: absolute; : 25%; left: 25%; width: 50%; height: 50%; padding: 16px; border: 16px solid orange; background-color: white; z-index:1002; overflow: auto; } </style> <script> function one(){ document.getElementById('light').style.display='block'; document.getElementById('fade').style.display='block' } function two(){ document.getElementById('light').style.display='none'; document.getElementById('fade').style.display='none' } </script> </head> <body> <p>可以根据自己要求修改css样式 <a href="javascript:void(0)" onclick="one()">点击这里打开窗口</a> </p> <div id="light" class="white_content"> This is the lightbox content. <a href="javascript:void(0)" onclick="two()">Close</a> </div> <div id="fade" class="black_overlay"> </div> </body> </html>
以上就是本文的全部内容,希望对大家有所帮助,希望大家继续关注狼蚁SEO的最新内容。
上一篇:Javascript中作用域的详细介绍
下一篇:jQuery事件用法详解
编程语言
- 机械手焊接机器人编程 机械手焊接设备编程
- vb数据库编程实例,vb做数据库
- tiobe世界编程语言排行榜,全球编程语言排行
- 成都java编程培训 成都it编程培训中心
- 编程基础培训,编程基础知识培训
- flash游戏编程基础教程,flash游戏开发教程
- 不会英语能学编程吗 不会英语可以学程序员吗
- 爱心代码编程C语言 爱心代码编程c语言公式
- c语言编程学习入门 c语言编程快速入门
- 西门子plc编程培训 西门子plc编程培训班
- 哪里可以学编程 台州哪里可以学编程
- 少儿编程哪个好 少儿编程哪个品牌好
- 编程是什么意思,图形编程是什么意思
- c语言编程软件下载,c语言编程软件在哪下载
- java编程软件下载,java编程下载手机版
- ug编程培训学校,ug编程培训教程