Use CSS to add a photo

xiaoxiao2021-03-06  78

[Lazy taking pictures] Use CSS to add the photo

Sometimes we don't like the photos shared by yourself.

In the case of unknow,

The murderer is right-click copy

Or more direct, drag the photo to the reader's desktop

Although Google will find a lot of JavaScript to prevent gambling this situation but feel that those grammar is very difficult. Once there is a problem, I don't know how to adjust, and it is likely that there will be other side effects. Some injuries.

In the previous article, we mentioned the concept of the CSS background layer, add some reminder patterns along with the same logic, we can also use CSS to add a layer of protection like a layer of protection. Bar is like a transparent protective film to pick up a transparent protective film for your PDA screen.

First, we make a completely transparent GIF file (the file size 1PX width * 1px is high), named: Spacer.gif followed in your photo html map syntax:

Style = "Background: URL (your photo path) White no-repeat center; width: *** px" />

Trend :)

In the above grammar,

We regard the transparent staging as the main display layer.

Take our photos, as a background

Thus,

When the reader presses slide on your photo

Or directly dragged directly,

The object of the role is actually the transparent Spacer.gif

Not moving to our photos

In addition, we can add a delicate photo border, or the grammar integrated in the "Download ..." mentioned in the previous article is this:

Style = "Background: URL (your photo path) White no-repeat center; width: *** px" />

PS:

The so-called "prevention" copy sharing photos, in fact, only can only prevent gentlemen, so just add a little trouble (which method can't avoid "screen copy") This CSS photo protection method is added to increase the difficulty of being replicated. In addition, there is a use, that is, I hate to see the diagram of the missing picture on my page, after turning the photo into the background, even if fotki.com (I bought the electronic photo album) hangs, the page is not The annoying illumination XX is shown ^ 0 ^ This is actually a real reason for writing this article: P

转载请注明原文地址:https://www.9cbs.com/read-120985.html

New Post(0)