[英]Highslide - margins of html popup and picture [highslide]
I am using two slideshowGroups
in the same page: one is for pictures (gallery) and one is for html (in iframe) only. 我在同一页面中使用了两个
slideshowGroups
:一个用于图片(图库),一个用于html(在iframe中)。 How to set different margins for each? 如何为每个设置不同的边距?
I need to have marginBottom
= about 80px and marginLeft
= about 200px for pictures, to give space for specifically designed controls, but html-s should be centered vertically and horizontally. 对于图片,我需要具有
marginBottom
=大约80px和marginLeft
=大约200px,以便为专门设计的控件提供空间,但是html-s应该垂直和水平居中。
Thank you! 谢谢!
Set hs.align = 'center';
设置
hs.align = 'center';
as global setting for both slideshowGroup. 作为两个slideshowGroup的全局设置。 This will center both
slideshowGroup
regardless what margins you are using. 无论您使用什么页边距,这都将使两个
slideshowGroup
居中。
Default margins for all sides are 15. I don't know the name of the slideshowGroup
for your gallery, but say it's 'gallery'
– add this to your settings (requires highslide-full.js): 各方的默认边距为15。我不知道您画廊的
slideshowGroup
的名称,但说它是'gallery'
–将其添加到您的设置中(需要highslide-full.js):
hs.Expander.prototype.onInit = function () {
hs.marginBottom = (this.slideshowGroup == 'gallery') ? 80 : 15;
hs.marginLeft = (this.slideshowGroup == 'gallery') ? 200 : 15;
};
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.