龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > div+css/html >

CSS趣味实用代码:图片防盗链

时间:2012-12-29 08:41来源:未知 作者:admin 点击:
分享到:
  实现方法很简单
  在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.webjx.com/images/logo.gif").substr(0, 0)
 )
 );
}
  然后修改下上面的图片路径,随便找个乱七八糟的图放上去,就OK.另存起来还是有点头疼的,要看源代码才行.

精彩图集

赞助商链接