对齐工具提示中的垂直文本
我试图垂直对齐工具提示内的文本,但我做不到。
我正在使用 Jquery 工具 http://flowplayer.org/tools/tooltip/index.html
I was trying to vertical-align the text inside a tooltip but I cannot.
I'm usign Jquery Tools http://flowplayer.org/tools/tooltip/index.html
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据您提供的链接,我发现工具提示使用以下 CSS。
该博客有一篇关于垂直居中内容的精彩文章
http://blog.themeforest。 net/tutorials/vertical-centering-with-css/
基于此并假设您不必支持 IE7,那么我会考虑
display: table-cell
方法。您可以将其应用于您的工具提示类。不过,您必须先包装单元格内容。只是认为我们不知道 css 如何应用于这些工具提示。它们被分配了显示属性
block
。您可能需要确保插件代码对工具提示的更改不会删除您的display:table
属性。因此,您实际上可能想要对内容进行双重包装,以确保您的 CSS 不会被覆盖。Based on link you provided I see that the tooltips use the following CSS.
This blog has a great article on vertically centering content
http://blog.themeforest.net/tutorials/vertical-centering-with-css/
Based on that and assuming that you don't have to support IE7 then I would think about the
display: table-cell
method. You would apply this to your tooltip class. You would have to wrap the cell content first though.Was just thinking that we don't know how css is applied to these tooltips. They are assigned the display property
block
. You may need to make sure that alterations to the tooltip by the plugin code doesn't remove yourdisplay:table
property. So you may actually want to double wrap the content to ensure your css doesn't get overwritten.