任何人都可以帮助解决 Galleria.js 实现中的填充/边距问题吗?
我一生都无法弄清楚为什么这个 PregoApp 幻灯片主题中图像周围的填充/边距不均匀。无论我对 CSS 做什么,似乎都没有办法可靠地修复它。
这是网站。
该网站也使用相同的实现,但已进行调整以使其看起来正确,因为所有图像的大小相同: http:// mansfieldgallery.co.nz/
有更好的方法吗?任何提示将不胜感激。
I can't for the life of me figure out why the padding/margins around the images in this PregoApp slideshow theme are not even. No matter what I do to the CSS, nothing seems to fix it reliably.
Here's the site.
And this site also uses the same implementation but has been tweaked to look right since all the images are the same size: http://mansfieldgallery.co.nz/
Is there a better way to do this? Any tips would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我了解,您不喜欢这样,当图像不像其他图像那样宽时,填充不会改变并且始终保持不变,对吗?
我用 Opera Dragonfly 来调查这是为什么,当你查看
时,你可以发现这个元素的样式是:
style= “宽度:578px;高度:399px;”
。因此,要么 jQuery/JavaScript 在页面加载后设置此样式并且它始终保持不变,要么您就是这样设置的人。难怪为什么填充是恒定的。
可能的解决方案:
的宽度以适应实际图像。
As I understand, you don't like that, when image is not do wide as other the padding do not change and always stays the same, right?
I used Opera Dragonfly to investigate why is that, and when you look at
<div class="galleria-container" />
you can find that styles of this element are:style="width: 578px; height: 399px;"
.So either jQuery/JavaScript set this styles after page load and it stays the same all the time or you was the one who set it like that. No wonder why padding is constant.
Possible Solutions:
<div class="galleria-container" />
to fit the actual image.