特色滑块的 CSS 溢出问题
在这个网站上 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技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您只需要在禁用 JavaScript 支持的浏览器中使用
overflow:hidden
,那么您可以将规则保留在代码中,但一旦文档发布,就使用 JavaScript 将其重置为visible
已准备就绪——这样就不会影响支持 JavaScript 的浏览器。例子:
If you only need
overflow: hidden
for browsers with disabled JavaScript support, then you can keep the rule in the code, but reset it tovisible
using JavaScript as soon as the document is ready -- this way it won't affect JavaScript-enabled browsers.Example: