CSS实现简单的图片防盗链代码_CSS/HTML
程序员文章站
2022-04-26 22:29:10
...
实现方法很简单,在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://siyizhu.com/styles/nicky/images/clear.gif").substr(0, 0)
)
);
}