当前位置:首页 > 网站应用 > 正文内容

js弹出居中窗口特效

cjw1231年前 (2023-11-01)网站应用2590
<html>
<head>
<title>弹出窗口效果</title>
<style>
.black_overlay{display:none;position:absolute;top:0%;left:0%;width:100%;height:100%;background-color: black;z-index:1001;  -moz-opacity: 0.8;opacity:.80;filter:alpha(opacity=80);}
.www {display:none;position:absolute;top:25%;left: 25%;width:50%;height:50%;padding:16px;border:16px solid orange;background-color: white;z-index:1002;overflow:auto;}
</style>
</head>
<body>
<p><a href="javascript:void(0)" onclick="document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">点击这里弹出窗口</a></p>
<div id="light" class="www">
 www.cjw123.com<br/>可以设置公告内容,或者打赏内容。
 <a href="javascript:void(0)" onclick="document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">
 关闭</a></div>
<div id="fade" class="black_overlay">
</div>
</body>
</html>


扫描二维码推送至手机访问。

版权声明:本文由追求完美发布,如需转载请注明出处。

本文链接:https://cjw123.com/blog/?id=43

标签: JS
分享给朋友:

相关文章

html meta标签屏蔽搜索引擎的用法

html页面中的 meta 标签可以用来识别搜索引擎的蜘蛛类型,可以规定meta标签所在的html页面是否被蜘蛛抓取,下面是这个meta标签的用法,大家可以借鉴一下。搜索引擎的 meta 标签的解析下面是meta标签对搜索引擎的解析<meta name='robot...

js文字定时向上滚动特效代码

<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <t...

好看的网站自适应图片文字广告位代码

<div class="ad"> <!--图片横幅广告--> <a href="https://cjw123.com/blog/" target="_blank" &...

谷歌免费网站ico图标接口

分享个免费有用的ico图标的接口,可以使用谷歌提供的友链ico接口读取网址的ico图标,就可以很轻松的实现为网站友情链接增加ico图标。ico图标接口:https://t1.gstatic.cn/faviconV2?client=SOCIAL&type=FAVICON&fallbac...

js打印文字打字输出特效代码

<center> <style type="text/css"> .a{background:#666666; border:0px solid #000000; width:300px; h...

文字特效代码:超酷文字快速展示

<!--要完成此效果需要三个步骤 第一步:把如下代码加入到<head>区域中--> <style> .let{ color:white; font-family:Verdana; font-weight:bold; width:500; filte...

发表评论

访客

看不清,换一张

◎欢迎参与讨论,请在这里发表您的看法和观点。