弹出层并随滚动而动

来源:网络 责任编辑:栏目编辑 发表时间:2013-07-01 13:24 点击:

弹出层


view plain
<!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" xml:lang="en"> 
<head> 
    <title></title> 
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> 
    <style type="text/css"> 
        *{margin:0;padding:0;} 
        body{background:#fff;font-size:12px;} 
        .drag_wrap{width:500px;height:300px;position:absolute;border:1px solid #ccc;display:none;z-index:3;background:#fff;} 
        .drag_wrap h1{position:relative;height:35px;line-height:35px;text-indent:1em;font-size:14px;cursor:move;font-weight:normal;background:#efefef;border-bottom:1px solid #ccc;} 
        .drag_wrap h1 span{position:absolute;font-size:12px;bottom:1px;right:10px;cursor:pointer;} 
        .drag_cont{padding:10px;line-height:23px;text-indent:2em;} 
        .mask{position:absolute;left:0;top:0;z-index:2;background:#000;filter:alpha(opacity=50);opacity: 0.5;} 
        .in{margin:50px auto;width:80px;} 
    </style> 
</head> 
<body> 
    <div class="in"><input type="button" value="猛击我" onclick="drag.init().move('drag')" /></div> 
    <div class="in"><a href="###" onclick="drag.init('drag2').move('drag2')">铁道部回应京沪高铁频出故障:设备处于磨合期</a></div> 
     
    <div id="drag2" class="drag_wrap"> 
        <h1>铁道部回应京沪高铁频出故障<span>关闭</span></h1> 
        <div class="drag_cont"> 
            <p>各位网友好!首先我要感谢人民网强国论坛为我提供与广大网友再聚的机会。在我来之前,看了许多网友的留言,其中就有一位网友提醒我要做好挨骂和挨拍的准备。是的,今天来到这里,就是代表铁路系统向大家真诚道歉、说明情况。京沪高铁开通半个月以来,总体客流和服务情况是好的。但近几天连续发生故障,影响列车正常运行</p> 
            <p>6月30日,京沪高铁开通运营。请您介绍一下总体运营情况,比如开行列车数量、运送旅客人数、正点率、安全情况等。</p> 
        </div> 
    </div> 
     
    <script type="text/javascript"> 
        var drag = { 
            $: function(){ return document.getElementById(arguments[0]);}, 
             
            /**
             * 得到视口的大小
             */ 
            getWindowsSize: function(){ 
      

    相关新闻>>

      发表评论
      请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
      用户名: 验证码:点击我更换图片
      最新评论 更多>>

      推荐热点

      • Gb2312转utf-8编码的方法(vbs+js)
      • 如何使用Ajax技术开发Web应用程序(1)
      • js跳转路径问题
      • JavaScript模仿桌面窗口
      • 用js检测两个线段是否相交
      • 运用JavaScript构建你的第一个Metro式应用程序(on Windows
      • 我知道的JavaScript -- 设计模式(桥接)应用之 – 验证器
      • 我是如何去了解jquery的(六),案例之幻灯片轮换
      • Jquery封装幻灯片效果
      网站首页 - 友情链接 - 网站地图 - TAG标签 - RSS订阅 - 内容搜索
      Copyright © 2008-2015 计算机技术学习交流网. 版权所有

      豫ICP备11007008号-1