【问题标题】:Hidding the text is not working in mozilla (Can i get alternative)隐藏文本在 mozilla 中不起作用(我可以得到替代)
【发布时间】:2020-12-10 16:26:57
【问题描述】:

我把css写成

.hidetext { -webkit-text-security: disc; }

通过使用以下代码隐藏此文本来显示在表格中。

<tr><td>Ramp : </td><td class="hidetext"><?php echo $_POST["uma"] ?></td></tr>

这适用于 chrome 它不适用于 mozilla。

【问题讨论】:

    标签: html css cross-browser


    【解决方案1】:

    此功能非标准并且不在标准轨道上。请勿在面向 Web 的生产站点上使用它:它不适用于所有用户。也可能实现之间存在很大的不兼容性,并且行为可能会在未来发生变化。

    简而言之,Firefox 不支持它

    https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-text-security

    但是,有一个包旨在提供跨浏览器替代-webkit-text-security

    https://github.com/noppa/text-security

    【讨论】:

    • 我能找到任何替代品吗
    【解决方案2】:

    任何以-webkit- 开头的 css 属性仅受基于 chromium/chrome 的浏览器支持,例如 Chrome、Opera、Edge 等。但是 Firefox 不是其中之一,因此它不起作用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-08-13
      • 1970-01-01
      • 2014-02-15
      • 2016-10-03
      • 1970-01-01
      • 1970-01-01
      • 2012-02-13
      • 1970-01-01
      相关资源
      最近更新 更多