悬浮框的demo

<!DOCTYPE html PUBLIC "-//W3C//dtd XHTML 1.0 transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <script src="jquery-1.11.0.min.js"></script>
</head>


<body>
<style>
    .zhezhaobg { display:none; margin:-20px 0 0 -20px; width:100%; height:100%; position:fixed; top:0px; left:0px; z-index:99998; background:#333; opacity: 0.5; filter:alpha(opacity=50); }
    .xuanfucon { display:none; margin:-150px 0 0 -280px; width:560px; height:300px; position:fixed; top:50%; left:50%; z-index:99999; background:#fff; }
    .xf_close { margin:auto; width:auto; height:22px; line-height:22px; display:block; position:absolute; top:5px; right:10px; }
    .xuanfu_con { text-align:center; padding:20px;}
</style>
<script type="text/javascript">
    $(document).ready(function(){
        $(".djchx").click(function(){
            $(".zhezhaobg").show();
            $(".xuanfucon").show();
        });
        $(".xf_close").click(function(){
            $(".zhezhaobg").hide();
            $(".xuanfucon").hide();
        });


    });
</script>
<div>
    <a class="djchx" href="#" title="斯蒂芬斯蒂芬森">斯蒂芬斯蒂芬森</a>
</div>


<div class="zhezhaobg">
</div>
<div class="xuanfucon">
    <a class="xf_close" href="#">关闭</a>
    <div class="xuanfu_con">
        这里是显示地方
    </div>
</div>


</body>
</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值