使用 GWT 溢出到滚动条和下一个面板的右侧
我有一个 GWT 应用程序,它有一个带有目录树的左侧可滚动导航面板。我希望能够通过底部的滚动条(我有)来保持面板狭窄,但在悬停时显示整个文件名,溢出垂直滚动条并进入下一个面板。我可以通过在悬停时用全名覆盖一个小 div 来做到这一点,但这看起来很笨拙,并且容易出现微妙的视觉错误。我尝试过调整可见性、换行和 z 索引,但没有效果。我可以通过调整相关项目的 CSS 参数或其他一些不那么笨拙的方式来做到这一点吗?
IntelliJ 以正确的方式执行此操作,但它们不在浏览器中:
谢谢, -拉尔斯
I have a GWT application that has a left-hand scrollable navigation panel with a directory tree. I would like to be able to keep the panel narrow with a scroll bar at the bottom (which I have) but show the entire file name on hover, overflowing over the vertical scrollbar and into the next panel. I could do it by overlaying a small div with the full name when hovering, but that seems klugey and prone to subtle visual errors. I've tried fiddling with visibility, wrap and z-index with no effect. Can I do this by just adjusting the CSS parameters of the item in question, or on some other not-so-klugey way?
IntelliJ does this in the right way, but they're not in a browser:
Thanks,
-Lars
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为你必须使用覆盖层。如果标签位于 div 内,则该 div 将控制溢出,并且无法为不同的子项指定不同的溢出值。
您可以在运行时将标签中的所有样式复制到新的覆盖 div 上,以避免重复所有样式。我可能会放弃仅在溢出周围(在示例图片中的“esponse”周围)设置轮廓框。这似乎很难。
I think you'll have to go with an overlay. If the labels are inside a div then that div will control the overflow, and there's no way to specify different overflow values for different children.
You could copy all of the styles from your label onto your new overlay div at runtime to avoid having to duplicate all your styling. I'd probably give up on having the outline box only around the overflow (around "esponse" in your example picture). That seems hard.
不幸的是,它不能在 HTML 中完成。根据规范。
Unfortunately, It can't be done in HTML. according to the spec..