Read more here: 👇
👉 The default CSS border property accepts only solid colors, you cannot provide a gradient there
👉 There is also a property called border-image but it is not compatible with border radius
So to fix this, a common solution is to use pseudo elements like this example. We have the after pseudo element for the foreground and the before pseudo element for the background.
The before element has the linear gradient as the background, and on hovering, we scale it to reveal the gradient as a kind of border
⚠️ One drawback is that the scaling is not even, so the border would appear thinner in the longer side and thicker in the shorter side
#css
#csstricks
#frontend
#webdesign
#javascript
#html
#coding
#programming
#reactjs
#vuejs
Nesta página do site você pode assistir ao vídeo on-line CSS Button Gradient Border duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário CodeMentor 21 Agosto 2024, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 3,096 vezes e gostou 200 espectadores. Boa visualização!