是否可以禁用在页面中查找的 Ctrl + F? [英] Is it possible to disable Ctrl + F of find in page?

查看:26
本文介绍了是否可以禁用在页面中查找的 Ctrl + F?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个拼图网站,这是一种很糟糕的作弊方式.如果只是部分可以,但是可以吗?
我的想法是用图像替换字母,但还有比这更容易的事情吗?

I have a puzzle site and its an awful way of cheating. Its okay if only partially, but can it be done?
Something I had in mind was replacing the letters with images, but anything easier than that?

推荐答案

与其禁用 Find 功能,不如让 Find 无法找到单词!一种方法是使用 CSS content 声明来注入单词.查找不会找到它们:

Rather than disable the Find function, you could make it so that Find won't find the words! One way to do this would be to use the CSS content declaration to inject the words. Find won't find them:

<div class="word-foobar"></div>

.word-foobar:before {
    content: "Foobar";
}

您也可以很容易地编写一些 Javascript 来自动为您生成所有必要的 CSS 规则.

You could quite easily write some Javascript to automatically generate all the necessary CSS rules for you, too.

这篇关于是否可以禁用在页面中查找的 Ctrl + F?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆