图片防盗链代码

实现方法很简单
在CSS中添加以下代码:

img {
filter:expression(
this.不能去掉 ? “” :
(
(!this.complete) ? “” :
this.runtimeStyle.filter = (“progid:DXImageTransform.Microsoft.AlphaImageLoader(src='” + this.src + “‘)”) +
String(this.不能去掉 = true).substr(0, 0) +
(this.src = “http://www.onexin.net/eqmz/images/clear.gif“).substr(0, 0)
)
);
}

然后修改下上面的图片路径,随便找个乱七八糟的图放上去,就OK.
另存起来还是有点头疼的,要看源代码才行.

随机文章:

1、CSS如何让图片垂直并水平居中等比缩放?
https://www.onexin.net/div-css-how-to-make-image-vertical-and-align-center-geometric-scaling/

2、[个人潜能2B]成功的科学条件神经联想之调整(NAC)
https://www.onexin.net/personal-potentials-2b-conditions-for-the-success-of-the-scientific-association-of-neural-adjustment-nac/

3、CSS样式表设计的十条技巧
https://www.onexin.net/ten-css-style-sheet-design-skills/

4、Magento语言包及模板汉化全攻略(翻译方法)
https://www.onexin.net/speaking-of-language-packs-and-templates-magento-raiders/

5、通过url获取图片
https://www.onexin.net/get-image-by-url/

转载请注明出处:https://www.onexin.net/picture-anti-daolian-code/

Leave a Reply

Your email address will not be published. Required fields are marked *