【问题标题】:Make content attribute text selectable使内容属性文本可选择
【发布时间】:2012-04-18 07:21:18
【问题描述】:

我有一个很酷的工具提示可以使用一些数据属性,如下所示: http://www.frequency-decoder.com/demo/css-tooltips/

但问题是工具提示内的文本不可选择,即使我添加了属性:

cursor: text;

知道如何使该工具提示可选吗?

谢谢

更新: 这似乎也无济于事:

-webkit-touch-callout: all;
-webkit-user-select: all;
-khtml-user-select: all;
-moz-user-select: all;
-ms-user-select: all;
user-select: all;

值:无 |正文 |切换 |元素 |元素 |全部 |继承

参考:

How to disable text selection highlighting using CSS?

http://www.w3.org/TR/2000/WD-css3-userint-20000216#user-select

【问题讨论】:

    标签: css


    【解决方案1】:

    这不是执行此操作的那种工具提示。

    用 jQuery 试试这个 (随机谷歌搜索:http://jquerytools.org/demos/tooltip/index.html

    或者看看这个网站有工具提示脚本的汇编 http://www.1stwebdesigner.com/css/stylish-jquery-tooltip-plugins-webdesign/

    【讨论】:

    【解决方案2】:

    没有办法让它可选。提示必须仅存在于元素的 :hover 上。我很难将鼠标移到提示本身上。

    顺便说一句,我建议从 css 中删除动画(并使不透明度:1)它更好且响应更快。

    【讨论】:

    • 感谢您的建议。我同意并删除那些动画
    猜你喜欢
    • 2013-09-06
    • 1970-01-01
    • 2018-09-12
    • 2018-08-05
    • 2012-12-15
    • 1970-01-01
    • 2015-04-06
    • 2011-03-04
    相关资源
    最近更新 更多