100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > javascript弹出窗口实现代码【javascript】

javascript弹出窗口实现代码【javascript】

时间:2022-10-07 21:08:42

相关推荐

javascript弹出窗口实现代码【javascript】

web前端|js教程

javascript,弹出窗口

web前端-js教程

很多网页都实现了弹出窗口,使用方面,特别的人性化,本文就大家介绍javascript实现弹出窗口特效,具体代码如下:

app社区源码,ubuntu中有什么包,tomcat内存只涨不降,爬虫状态101, php框架,重庆百度霸屏seo软件lzw

弹出窗口*{ margin: 0; padding: 0;}div{ margin: 0 auto; /*border: 1px solid red;*/}.overBg{ width: 100%; height: 100%; background: gray; opacity: 0.5; filter: alpha(opacity=50); position: fixed; top:0; z-index: 300;}.tc-con{ width: 200px; height: 200px; padding: 30px; background: blanchedalmond; position: fixed; top: 0; z-index: 1000;} $(function(){ $(.tc).hide(); $(.btn).click(function(){ $(.tc).show(); }) $(.tc).click(function(){ $(this).hide(); }) })

点击出现

22

var a=document.getElementById( c-con); a.style.left=(document.body.clientWidth/2- a.clientWidth/2)+px; a.style.top=(document.documentElement.clientHeight/2- a.clientHeight/2)+px;

22

弹出窗口*{ margin: 0; padding: 0;}div{ margin: 0 auto; /*border: 1px solid red;*/}.overBg{ width: 100%; height: 100%; background: gray; opacity: 0.5; filter: alpha(opacity=50); position: fixed; top:0; z-index: 300;}.tc-con{ width: 200px; height: 200px; padding: 30px; background: blanchedalmond; position: fixed; top: 0; z-index: 1000;} $(function(){ $(.tc).hide(); $(.btn).click(function(){ $(.tc).show(); }) $(.tc).click(function(){ $(this).hide(); }) })

点击出现

22

var a=document.getElementById( c-con); a.style.left=(document.body.clientWidth/2- a.clientWidth/2)+px; a.style.top=(document.documentElement.clientHeight/2- a.clientHeight/2)+px;

22

效果图:

活动集功能源码下载,Ubuntu全盘加密破解,金源爬虫馆,php cfca,快速提升seolzw

ipad上查看网页源码,ubuntu多任务宕机,tomcat微信昵称乱码,海洋爬虫馆,php账单管理系统,外贸seo优化一般多少钱lzw

以上就是为大家分享的javascript弹出窗口实现代码,希望对大家的学习有所帮助。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。