0

如果我设置它,是否可以防止垃圾邮件机器人爬遍我的电子邮件地址display: none?如果你愿意的话,我有一个小游戏的想法,用户点击电子邮件的链接,然后它会显示一两个“你确定你不是机器人”之类的问题。一旦这些都得到了回答,它就会显示真正的链接。

问题是我假设机器人可以看到链接,因为它显然存在于 HTML 中,即使它不可见。有没有解决的办法?

此外,我希望这些问题淡出,但据我了解,CSS3 过渡不支持显示或可见性属性。我必须求助于jQuery吗?display: none如果是这样,任何人都可以指导我在从 切换到时替代淡入元素display: block吗?

4

3 回答 3

0

No, display: none would not work.

The only real way around this is to not have it in your HTML whatsoever. Make it an image for example, or use JavaScript to descramble it into individual elements that can be placed absolutely (and individually) for a browser's human viewer to see correctly.

Note that if you go the image route, spambots can of course read images, so perhaps you should obfuscate it a little bit with some random images like the good old captchas.

With regards to CSS3 not supporting visibility/display, you'd be right, but you can use the opacity property to fade in the content of however you decide to display your email address. opacity is fully supported by CSS3 transitions.

于 2012-08-31T19:05:52.297 回答
0

Most crawlers analyse the markup of a page, not the visual rendered version. Using display: none will have very little effect.

Also, you don't need to use jQuery for fading effects. Setting the opacity and then using the following will work nicely:

-webkit-transition: opacity 0.2s linear;
        transition: opacity 0.2s linear;
于 2012-08-31T19:06:20.673 回答
0

您可能希望实现一个联系表单,而不是显示电子邮件地址。您可以使用验证码或一些蜜罐方法来保护该表单。此外,您可以使用 Javascript 呈现表单,因为许多机器人不会运行 Javascript(我希望如此)。

于 2012-08-31T19:08:57.053 回答