特色滑块的 CSS 溢出问题

发布于 2024-12-07 15:00:28 字数 403 浏览 0 评论 0原文

在这个网站上 http://rwl.rwlwater.com/ 我有一个小问题......我添加了溢出:隐藏到特色滑块 div 中,如果启用了 javascript 或用户的互联网连接速度较慢,则图片会堆叠显示。

但现在我有另一个问题。描述中有一个小东西位于滑块之外,并且它是隐藏的现在...如果我添加overflow-x:visible它会添加滚动条,这不是我想要的。我希望描述完全可见,但溢出-y 被隐藏。

如果您想看到完整的内容,只需使用 Firebug 并删除滑块上的溢出:隐藏,描述内容将再次显示...如果添加溢出,它将隐藏。我需要它没有任何滚动条。我尝试了溢出-x:可见和自动,但它只在底部添加了一个滚动条,这对我不起作用,我需要原始效果。

On this website http://rwl.rwlwater.com/ I have a small issue... I added overflow: hidden to the featured slider div, the pictures were showing up stacked if the javascript was enabled or the user had a slow internet connection..

But now I have another problem.. The description had a little thing positioned outside the slider and it's hidden now...If I add overflow-x: visible it adds the scroll bar and that's not what I want. I want the description to be fully visible, but the overflow-y to be hidden.

If you want to see the fully thing, just use Firebug and remove overflow: hidden on the slider and the description thing will show up again...If you add the overflow, it will hide. I need to have it without any scroll bar. I tried overflow-x: visible and auto but it only adds a scroll bar at the bottom and that doesn't work for me, I need the original effect.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夏日浅笑〃 2024-12-14 15:00:29

如果您只需要在禁用 JavaScript 支持的浏览器中使用 overflow:hidden ,那么您可以将规则保留在代码中,但一旦文档发布,就使用 JavaScript 将其重置为 visible已准备就绪——这样就不会影响支持 JavaScript 的浏览器。

例子:

$(function () {
    $('#slides').css('overflow', 'visible');
});

If you only need overflow: hidden for browsers with disabled JavaScript support, then you can keep the rule in the code, but reset it to visible using JavaScript as soon as the document is ready -- this way it won't affect JavaScript-enabled browsers.

Example:

$(function () {
    $('#slides').css('overflow', 'visible');
});
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文