<DIV id="a_1" style="border: 2px solid #00FF00;">
<DIV id="b" style="border: 2px solid #00FFFF;">
<DIV id="a_001" style="border: 2px solid #990033" ></DIV>
</DIV>
<DIV class="b" id="h" style="border: 2px solid #CCFF00; left: 1050px; width: 45px ">
<IMG id="imgOpen" alt="右上角浮动或右上角定位" src="images/a.gif" border=2>
</DIV>
</DIV><STYLE type="text/css">
.b{position:relative;text-align:right;top:0px;padding-right:0px;}
</STYLE>如何设置css或者js能使id=h的div框一直悬浮或者定位(定在那不动)在id=a_1的div框的右上角,因为在id=h的div框中可能添加更多的图片和div以及数据等,这个悬浮或者定位是要在谷歌浏览器中显示的,请各位大神帮下小弟,谢谢了。最好能悬浮起来,谢谢了
<DIV id="b" style="border: 2px solid #00FFFF;">
<DIV id="a_001" style="border: 2px solid #990033" ></DIV>
</DIV>
<DIV class="b" id="h" style="border: 2px solid #CCFF00; left: 1050px; width: 45px ">
<IMG id="imgOpen" alt="右上角浮动或右上角定位" src="images/a.gif" border=2>
</DIV>
</DIV><STYLE type="text/css">
.b{position:relative;text-align:right;top:0px;padding-right:0px;}
</STYLE>如何设置css或者js能使id=h的div框一直悬浮或者定位(定在那不动)在id=a_1的div框的右上角,因为在id=h的div框中可能添加更多的图片和div以及数据等,这个悬浮或者定位是要在谷歌浏览器中显示的,请各位大神帮下小弟,谢谢了。最好能悬浮起来,谢谢了
解决方案 »
- 求助:子窗口如何传参调用父窗口函数
- 请问JavaScript有服务器端脚本语言功能吗?
- 求助
- 隔行换色+选中高亮 的高性能解决方案 求助
- 这样子参数怎么传啊?!
- 这代码是如何实现的?
- 如何得到层里面的链接?
- 随着我点单选项的位置不同,form中的一个表格中的几行显示或隐藏,如何处理?
- 请教高手:onunload事件中能否返回false,达到不离开当前页面的目的吗?如果不能,用什么方法可以实现?在线苦等!
- ie中window.open子页面返回值问题,被呼叫方(服务器 [不是服务器应用程序])不可用并已消失。所有连接均无效。没有执行呼叫
- 昨天求的代码还有一点小问题,今天继续请教。
- 在线求助,关于JavaScript截取字符串问题
<!doctype html>
<html dir="ltr" lang="zh-CN">
<head>
<meta charset="utf-8"/>
<title>CSS Position Fixed for IE6</title>
<style>
* html,* html body {background-image:url(about:blank);background-attachment:fixed;}
* html .fixed-top {position:absolute;bottom:auto; top:expression(eval(document.documentElement.scrollTop +(document.documentElement.clientHeight-this.offsetHeight)/2 ));}
* html .fixed-right {position:absolute;right:0px;left:auto;}
* html .fixed-bottom {position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)));}
* html .fixed-left {position:absolute;right:auto;left:expression(eval(document.documentElement.scrollLeft));}
.fixed-bottom {
position:fixed;
left:0px;
bottom:20px;
background:aqua;
width:200px;
height:200px;
}
.fixed-right{
position:fixed;
right:0px;
left:auto;
top:200px;
top:expression(eval(document.documentElement.scrollTop +(document.documentElement.clientHeight-this.offsetHeight)/2 ));
background:red;
width:200px;
height:200px;
}
.fixed-top{
position:fixed;
top:0px;
left:0px;
background:blue;
width:200px;
height:200px;
}
</style> </head>
<body>
<div style='height:2000px;width:500px;margin:10px auto; border:1px solid red;'></div>
<div class="fixed-top"></div>
<div class="fixed-bottom"></div>
<div class="fixed-right"></div>
</body>
</html>
要让h一直在a_1右下角,你也得设置a_1的position<DIV class="b" id="h" style="border: 2px solid #CCFF00;position:fixed; right:0px; width: 45px ;">
<IMG id="imgOpen" alt="右上角浮动或右上角定位" src="images/a.gif" border=2>
</DIV>
<html>
<head>
<title>divPosition.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
div {
width: 100px;
height: 100px;
position: absolute;
z-index: 999;
border: 1px solid block;
}
#div1 {
top: 0;
left: 0;
}
#div2 {
right: 0;
bottom: 0;
}
</style> </head>
<body>
<div id="div1">
aabc
</div>
<div id="div2">
aabcaaaaaaaaaa
</div>
</body>
</html>