当前位置:首页 > 开发教程 > IT博文 > 网页设计 >

CSS图片防盗链代码

时间:2013-10-09 10:05 来源:互联网 作者:源码搜藏 收藏

html head titleCSS也可实现图片防盗链/title style img { filter:expression( this.不能去掉 ? "" : ( (!this.complete) ? "" : this.runtimeStyle.filter = ("progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "')") + String(thi <html>
<head>
<title>CSS也可实现图片防盗链</title>
<style>
img {
 filter:expression( this.不能去掉 ? "" : ( (!this.complete) ? "" : this.runtimeStyle.filter = ("progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "')") + String(this.不能去掉 = true).substr(0, 0) +
 (this.src = "/images/logo.gif").substr(0, 0) ) );
}
</style>
</head>
<body></body>

</html>

  • CSS实现图片防盗链,CSS代码中的图片地址可以随便找一个换上,主要是使用filter:expression来实现,虽然可以实现,不过很多朋友反应,这样使用filter,是可以,但可能会有效率问题,呵呵,所以仅供参考。


网页设计阅读排行

最新文章