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: