简体   繁体   English

凹凸框(替代灯箱)的宽度设置为100%,而不是800像素

[英]Bumpbox (lightbox alternative) width set to 100% instead of 800pixels

I'm using this plugin http://www.artviper.net/website-tools/bumpbox-lightbox.php to display flash files. 我正在使用此插件http://www.artviper.net/website-tools/bumpbox-lightbox.php来显示Flash文件。 I need to change width and height of the window to 100% instead of pixels. 我需要将窗口的宽度和高度更改为100%,而不是像素。 I uploaded the script here: http://www.bodom.eu/bumpbox/bumpbox-2.1.js 我在此处上传了脚本: http : //www.bodom.eu/bumpbox/bumpbox-2.1.js

I use this link to display flash from my html file: <a href="01_ka01.swf" class="bump" rel="800-600"></a> 我使用此链接显示html文件中的Flash: <a href="01_ka01.swf" class="bump" rel="800-600"></a>

When no rel is defined, script use the default value 640x480 from bumpbox-2.1.js (exactly it is maxw = 640; and maxh = 480; - at line 121). 当未定义rel时,脚本将使用来自boostbox-2.1.js的默认值640x480(恰好是maxw = 640; maxh = 480; -在第121行)。

So, I need to change that rel to percentage value, or that default value in the .js file. 因此,我需要将rel更改为百分比值,或.js文件中的默认值。 I've tried add width="100%" height="100%" to that anchor, but it didn't work. 我尝试将width="100%" height="100%"到该锚点,但是没有用。 I've also tried change maxw=640; 我也尝试过更改maxw=640; to maxw='100%'; maxw='100%'; but with no effect. 但没有效果。

w = window.getSize().x.toInt(); w = window.getSize()。x.toInt(); h = window.getSize().y.toInt(); h = window.getSize()。y.toInt();

that means you know the dimensions of the window. 这意味着您知道窗口的尺寸。

maxw = w; maxw = w; maxh = h; maxh = h;

should do the trick. 应该可以。

yes, we're the developers of this script. 是的,我们是该脚本的开发人员。 Glad it works out for you now ;) 很高兴现在为您解决了;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM