弹出窗口上的关闭按钮移动大小?和IE问题 [英] Close button on pop up move with size? And IE issue

查看:74
本文介绍了弹出窗口上的关闭按钮移动大小?和IE问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设法拼凑了一些代码,所有我需要的就是

我创建的关闭按钮始终位于弹出窗口的右上角。

弹出窗口是缩略图图像的大版本,大小不一,所以

这就是为什么我需要按钮来跟随图像大小。这可能是

吗??

AND,这在IE中无法正确呈现!

有人可以帮帮我吗? :(


< style type =" text / css">

.. myLayersClass

{

能见度:无;

}


..translucent

{

顶部:0px;

左:0px;

宽度:100%;

身高:100%;

position:absolute;

background-color:rgb(184,177,207);

filter:alpha(opacity = 70);

-moz-opacity:0.7;

opacity:0.7;

z-index:10001;

}


< / style>

< script>

<! - 开始


功能切换( id){

if(document.getElementById){

var layer = document.getElementById(id);

layer.style.display = (layer.style.display ==''none'')?''block'':''none'';

}

}


//结束 - >

< / script>

< / head>

<正文>

< center>

新的d改进了!< a href ="#"

onclick =" toggle(''blockUI''); toggle(''logo''); toggle(''popup'' );">点击确认

enlarge< / a<! - 缩略图链接 - >

< div id =" blockUI"类= QUOT;半透明" style =" display:none;

background-color:gray;

width:100%;身高:100%;位置:绝对;左:0px; top:0px;

z-index:50000;"

onclick =" return false" onmousedown =" return false"
onmousemove =" return false"

onmouseup =" return false" ondblclick =" return false"

< / div>

< div id =" popup" class =" myLayersClass"对齐= QUOT;中心" style =" display:

none;位置:绝对;左:440px;上:50px; z-index:60000;">

< table width =" 300" height =" 100">

< tr>

< td>

< center>

< br>

< a href ="#"

onclick =" toggle(''blockUI''); toggle(''logo ''); toggle(''popup'');">< img

src =" images / close_icon.jpg" />< / a>

< / center>

< / td>

< / tr>

< / table>

< / div>

< div id =" logo" class =" myLayersClass"对齐= QUOT;中心" style =" display:

none;

position:absolute;左:200px;上:100px; z-index:55000;"< img

src =" images / 86large.jpg" border = 0 alt ="" /<! - 大图片 - >

< / div>

< / center>

< / body> ;

< / html>

解决方案

Yuaw在9/14/2006 10:28 PM说了以下内容:


我设法拼凑了一些代码,而我需要的就是我的方式是

有我创建的关闭按钮总是弹出窗口的右上角。

弹出窗口是缩略图的大版本,大小不一,所以

这就是我需要按钮的原因遵循图像大小。这可能是

吗??

AND,这在IE中无法正确呈现!

有人可以帮帮我吗? :(



你的意思是你想要这样的东西:


< URL:http://www.litotes。 demon.co.uk/js_info/pop_ups.html>

-

兰迪

机会有利于准备好的心灵

comp.lang.javascript常见问题 - http://jibbering.com/faq &新闻组每周

Javascript最佳实践 - http://www.JavascriptToolbox .com / bestpractices /


>弹出窗口是缩略图的大版本,大小不一,所以


>这就是为什么我需要按钮来跟随图像大小。这可能吗?
AND,这个在IE中无法正确呈现!
有人可以帮助我吗?:(



你的意思是你想要的东西l请注意:


< URL:http://www.litotes.demon.co.uk/js_info/pop_ups.html>

-



对不起,我想在那里看到什么?

我看到的最接近的是该页面的链接:
http://www.litotes.demon.co.uk/示例... age_popup.html


在该页面上,从拇指打开的图像在代码中指定了它们的尺寸

看源头?

此外,他们没有关闭按钮,只是点击图片关闭类型的

系统哪个好看但不是我想要的。


但无论如何都要进行内部阅读......


" Yuaw" < wo*@wow.com在留言新闻中写道:qRuOg.10553


I managed to cobble together some code and all I need to be on my way is to
have the close button I created to always be at the top right of my pop up.
The pop ups are large versions of thumbnail images and vary in size, so
that''s why I need the button to follow the image size. Is this possible to
do??
AND, this does not render correctly in IE!
Can someone please help me out? :(

<style type="text/css">
..myLayersClass
{
visibility: none;
}

..translucent
{
top: 0px;
left: 0px;
width: 100%;
height: 100%;
position: absolute;
background-color: rgb(184, 177, 207);
filter:alpha(opacity=70);
-moz-opacity:0.7;
opacity: 0.7;
z-index: 10001;
}

</style>
<script>
<!-- Begin

function toggle(id){
if ( document.getElementById){
var layer = document.getElementById(id);
layer.style.display = (layer.style.display == ''none'') ? ''block'' : ''none'';
}
}

// End -->
</script>
</head>
<body>
<center>
New and improved! <a href="#"
onclick="toggle(''blockUI'');toggle(''logo'');toggle('' popup'');">Click to
enlarge</a<!-- Thumbnail Link -->
<div id="blockUI" class="translucent" style="display: none;
background-color: gray;
width: 100%; height: 100%; position: absolute; left: 0px; top: 0px;
z-index: 50000;"
onclick="return false" onmousedown="return false"
onmousemove="return false"
onmouseup="return false" ondblclick="return false">
</div>
<div id = "popup" class = "myLayersClass" align="center" style="display:
none; position: absolute; left: 440px; top: 50px; z-index: 60000;">
<table width="300" height="100">
<tr>
<td>
<center>
<br>
<a href="#"
onclick="toggle(''blockUI'');toggle(''logo'');toggle('' popup'');"><img
src="images/close_icon.jpg" /></a>
</center>
</td>
</tr>
</table>
</div>
<div id = "logo" class = "myLayersClass" align="center" style="display:
none;
position: absolute; left: 200px; top: 100px; z-index: 55000;"<img
src="images/86large.jpg" border=0 alt="" /<!-- Large Image -->
</div>
</center>
</body>
</html>

解决方案

Yuaw said the following on 9/14/2006 10:28 PM:

I managed to cobble together some code and all I need to be on my way is to
have the close button I created to always be at the top right of my pop up.
The pop ups are large versions of thumbnail images and vary in size, so
that''s why I need the button to follow the image size. Is this possible to
do??
AND, this does not render correctly in IE!
Can someone please help me out? :(

You mean you want something like this:

<URL: http://www.litotes.demon.co.uk/js_info/pop_ups.html>
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/


>The pop ups are large versions of thumbnail images and vary in size, so

>that''s why I need the button to follow the image size. Is this possible
to do??
AND, this does not render correctly in IE!
Can someone please help me out? :(


You mean you want something like this:

<URL: http://www.litotes.demon.co.uk/js_info/pop_ups.html>
--

Sorry, what am I suppose to see there?
The closest thing that I saw is this link from that page:
http://www.litotes.demon.co.uk/examp...age_popup.html

On that page, the images that open from mthe thumbs have their dimensions
specified in the code by looking at the source??
Also, they didn''t have a close button, just "click image to close" type of
system which is nice but not what I''m looking for.

But an interseting read anyway...


"Yuaw" <wo*@wow.comwrote in message news:qRuOg.10553


这篇关于弹出窗口上的关闭按钮移动大小?和IE问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆