Shadowbox 蒙皮和浆纱
如何对 Shadowbox 进行蒙皮并确保弹出窗口大小为固定大小?
css 部分没问题,因为它只是覆盖 id 和类。
但是,我不确定 markup.js
应该是什么样子。
所以这是我的问题:
我创建了
shadowbox-custom-skin/markup.js
并添加了如下钩子:add_filter('shadowbox-markup', 'shadowbox_custom_markup');
现在我找不到
markup.js
应该是什么样子的示例。
(我试图将sb-nav
div 放在内容之前,将sb-title
div 放在内容下面,并添加一些新参数)。我使用此方法修复了弹出窗口的大小:
rel="shadowbox;宽度=480px;高度=240px"
handleOversize
resize
不再起作用。这意味着,它会调整内容的大小,但会被挤压。
如何确保弹出窗口大小相同,但超大内容不会被挤压,而小内容则居中?
How do I skin shadowbox and make sure popup size is fixed size?
The css part is ok since it's just overriding ids and classes.
However, I'm not sure what the markup.js
is supposed to look.
So here are my questions:
I created
shadowbox-custom-skin/markup.js
and added the hook like:add_filter('shadowbox-markup', 'shadowbox_custom_markup');
Now I can't find an example of how the
markup.js
is supposed to look.
(I'm trying to put thesb-nav
div before the content and thesb-title
div below the content and also add some new parameters).I fixed the size of the popup using this method:
rel="shadowbox;width=480px;height=240px"
handleOversize
resize
no longer works. Meaning, it will resize content, but it's squeezed.
How do I make sure the popup is the same size, but oversized content isn't squeezed and small content is just centered?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你实际上不需要调整 javascript 来做到这一点。使用浏览器上的属性检查器或
Firebug
插件,右键单击Shadowbox
并查看正在使用哪些 css 类/id。将这些 css 类/id 放入您自己的样式表中,应用您想要的样式。然后将文件上传到您的服务器。You don't really need to tweak javascript to do this. Using the property inspector on your browser or the
Firebug
plugin, right click on theShadowbox
and see what css classes/ids are being used. Put those css classes/ids in your own stylesheet apply the styles you want. Then upload the file to your server.