当前位置:七道奇文章资讯网站建设网站美工
日期:2011-01-10 12:07:00  来源:本站整理

兼容IE FF 浮动层实现办法[网站美工]

赞助商链接



  本文“兼容IE FF 浮动层实现办法[网站美工]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:

<html>

<head runat="server">

<title></title>

<style>

body

{

font: 12px arial, helvetica, sans-serif;

}

a

{

text-decoration: none;

}

a:hover

{

color: red;

}

</style>

<script language="网页特效" type="text/javascript">

function chathidden() {

document.getelementbyid("div2").style.display = "none";

document.getelementbyid("movedivid").style.height = "26px";

}

function chatshow() {

document.getelementbyid("movedivid").style.display = "block";

document.getelementbyid("movedivid").style.height = "400px";

document.getelementbyid("div2").style.display = "block";

}

function chatclose() {

document.getelementbyid("movedivid").style.display = "none";

}

var drag_ = false

var d = new function('obj', 'return document.getelementbyid(obj);');

var oevent = new function('e', 'if (!e) e = window.event;return e');

function move_obj(obj) {

var x, y;

d("main").onmousedown = function(e) {

drag_ = true;

with (this) {

d("main").style.position = "absolute";

var temp1 = d("movedivid").offsetleft; //距离左边的初始值

var temp2 = d("movedivid").offsettop; //距离顶边的初始值

x = oevent(e).clientx;

y = oevent(e).clienty;

document.onmousemove = function(e) {

if (!drag_) {

return false;

}

with (this) {

d("movedivid").style.left = temp1 + oevent(e).clientx - x + "px"; //层离左边距的像素

d("movedivid").style.top = temp2 + oevent(e).clienty - y + "px"; //层离顶部距的像素

}

}

}

document.onmouseup = new function("drag_=false");

}

}

</script>

</head>

<body >

<form id="form1" runat="server">

<div>

<asp教程:listbox id="listbox1" runat="server" height="272px" width="756px" forecolor="#99ccff">

</asp:listbox>

<div id="movedivid" style="position: absolute; z-index: 1; background-color: #a0b4dc;

width: 500px; height: 400px; left: 35%; top: 10%">

<div id="main" onmousedown="move_obj('movedivid')" style="cursor: move; width: 480px;height: 25px;

display: inline;">

<div id="div3" style="display: inline; float: left;width: 400px;">

<strong style="color: #ffffff;"> cl层克己</strong></div>

<div id="div4" style="display: inline; float: right">

<strong style="color: #ffffff"><a href="#" onclick="chatclose();">X</a> </strong></div>

<div id="div5" style="display: inline; float: right">

<strong style="color: #ffffff"><a href="#" onclick="chatshow();">+</a> </strong></div>

<div id="div6" style="display: inline; float: right">

<a href="#" onclick="chathidden();"><strong style="color: #ffffff;">— </strong></a></div>

</div>

<div id="div2" style="background-color: #d9fdff; padding-bottom: 0px; position: relative;

width: 498px; top: 25px; height: 374px; margin: 0 auto;">

内容

</div>

</div>

</div>

</form>

</body>

</html>
 


  以上是“兼容IE FF 浮动层实现办法[网站美工]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
  • 兼容IE FF 浮动层实现办法
  • <b>实现持续长字符自动换行(兼容IE、Firefox)</b>
  • 兼容IE、FF、OP三个浏览器珍藏夹脚本
  • <b>兼容IE6/IE7/IE8/FireFox的CSS</b>
  • 本文地址: 与您的QQ/BBS好友分享!
    • 好的评价 如果您觉得此文章好,就请您
        0%(0)
    • 差的评价 如果您觉得此文章差,就请您
        0%(0)

    文章评论评论内容只代表网友观点,与本站立场无关!

       评论摘要(共 0 条,得分 0 分,平均 0 分) 查看完整评论
    Copyright © 2020-2022 www.xiamiku.com. All Rights Reserved .