Implementation of translucent border

When using CSS to achieve a semi-transparent border effect, we need to use a CSS property - background-clip.

The usage of background-clip is as follows:


The implemented CSS code is as follows:


The thing to note is to put the background-clip property below the background . Otherwise there will be no translucent effect.

The effect achieved is as follows:




Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325763043&siteId=291194637