寻找一个可以模糊/隐藏文本的 jQuery 插件

发布于 2024-08-21 23:03:48 字数 1539 浏览 4 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

捎一片雪花 2024-08-28 23:03:48

我不得不实施类似的事情。我只是使用了一个透明的 PNG(嗯,显然大部分 PNG 不是透明的)和一些透明的东西。足以让用户获得文本的提示,但不能真正看到它。并不是真正的模糊 - 更像是棋盘游戏 Outburst 在你将卡放在红色解码器后面之前所做的事情。我只是将覆盖 div 的背景图像设置为 PNG 并相应地调整大小。

I have had to implement something similar to this. I just used a transparent PNG (well, obviously most of the PNG was NOT transparent) with little pockets of transparency. Just enough so the user could get a hint of the text, but not really see it. Not really a blur - more like what the board game Outburst does before you put the card behind the red decoder thing. I just set the background image of an overlay div to the PNG and resize accordingly.

时光沙漏 2024-08-28 23:03:48

您可以使用 CSS3 来做到这一点:

    #hidden {
    color: transparent;
    text-shadow: #6374AB 0px 0px 20px;
}

编辑更多信息:目前仅适用于基于 WebKit 的浏览器。跨浏览器文本阴影信息如下:
创建跨浏览器兼容的 CSS 文本阴影

You could do this with CSS3:

    #hidden {
    color: transparent;
    text-shadow: #6374AB 0px 0px 20px;
}

Edit with more info: Currently only works in WebKit based browsers. Cross-browser text shadow info here:
Creating Cross Browser Compatible CSS Text Shadows

懒的傷心 2024-08-28 23:03:48

使用推拉门技术怎么样?你可以有一个小的垂直切片 png,它“模拟”一片模糊的文本,并用两个圆形边缘模糊块来封闭每一侧。然后,您可以使用这个模糊图像集创建一个覆盖/切换的 div,其宽度与单词的字符数相似,并隐藏该单词。

how about using the sliding doors technique? you could have a small vertical sliced png that "simulates" a slice of blurred text with two rounded edge blur pieces to cap off each side. you could then create an overlay/toggled div with this blurring imageset that is similar width to the number of characters of the word and hide the word.

温柔戏命师 2024-08-28 23:03:48

这里有一些使用 css3 执行此操作的示例: http://css-tricks .com/9053-fun-with-blurred-text/

There are some examples of doing this using css3 here: http://css-tricks.com/9053-fun-with-blurred-text/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文