当前位置:首页 > 代码 > 正文

图片弹窗代码(图片弹窗代码怎么弄)

admin 发布:2022-12-19 19:48 135


今天给各位分享图片弹窗代码的知识,其中也会对图片弹窗代码怎么弄进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!

本文目录一览:

打开网站弹出图片的代码怎么写?

img src.............../img

给img加css样式,绝对定位,左右居中,z-index置顶,top随意.

你需要控制img的显示与隐藏就可以了

网页弹窗代码

head

titlexxxxx/title

meta http-equiv="content-type" content="text/html; charset=gb2312" /

link href="css/css.css" rel="stylesheet" type="text/css" /

/head

body

script type="text/javascript" src=""/script

style

.tan{height:300px; background:url() no-repeat center;display:none;}

/style

script type="text/javascript"

window.onload=function(){setTimeout('dakai()',3000);} //打开页面后2秒显示出DIV

function dakai(){$(".tan").slideDown("slow");setTimeout('guanbi()',5000);}//显示出DIV后8秒关闭

function guanbi(){$(".tan").slideUp("slow");}

/script

style type="text/css"

#MyMoveAd {

text-align: center;

height: 0px;

background-color: #AC010A;

background-image: url(ad.jpg);

background-repeat: no-repeat;

background-position: center center;

display: block;

}

/style

/script

/body

求一个html 图片弹窗的 代码?

!DOCTYPE html

html

head lang="en"

    meta charset="UTF-8"

    title/title

    script src="jquery-3.2.1.min.js"/script

    style

    /style

/head

body

div style="width:250px;height:150px;background-color:#ff6600;"小图/div

div style="position:fixed;top:0px;left:0px;height:100%;width:100%;overflow:hidden;background-color:rgba(0,0,0,0.5);display:none;"

    div style="width:500px;height:300px;background-color:#ff6600;position:fixed;top:50%;left:50%;margin-left:-250px;margin-top:-150px"

        大图

    /div

/div

/body

/html

script

$(document).ready(function(){

    $("div").eq(0).click(function(){

        $("div").eq(1).show();

    });

    $("div").eq(1).click(function(){

       $(this).hide();

    });

})

/script

关于图片弹窗代码和图片弹窗代码怎么弄的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。

版权说明:如非注明,本站文章均为 AH站长 原创,转载请注明出处和附带本文链接;

本文地址:http://ahzz.com.cn/post/21395.html


取消回复欢迎 发表评论:

分享到

温馨提示

下载成功了么?或者链接失效了?

联系我们反馈

立即下载