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,是可以,但可能会有效率问题,呵呵,所以仅供参考。