FreeFrontend
freefrontend.com › css-border-animations
57 CSS Border Animations
3 weeks ago - An animated rainbow border with a neon glow, created using @property, repeating-conic-gradient, and SVG filters. The @keyframes CSS animation continuously changes the --a CSS variable, which controls the angle of the conic-gradient, creating a rotating rainbow effect.
Videos
30:10
Make an animated glowing border effect with CSS - YouTube
🔥 Create Stunning CSS Border Animations in 5 Minutes! [Part ...
Learn CSS Border Animations in 6 Minutes
12:05
Awesome Border Animation Effects using CSS - YouTube
02:12
🔥 Modern Border Animation | CSS Only - YouTube
07:21
CSS Border Animations with Framer Motion in 7 Minutes - YouTube
web.dev
web.dev › articles › css border animations
CSS border animations | Articles | web.dev
August 1, 2022 - A previously covered approach to draw a gradient border is to use CSS border-image. ... It allows for more simplified code as you do not need to deal with overlapping backgrounds. Animation can be applied in the same manner as before.
CSS-Tricks
css-tricks.com › animating-border
Animating Border | CSS-Tricks
December 6, 2017 - The challenge is simple: building a button with an expanding border on hover. This article will focus on genuine CSS tricks that would be easy to drop into any project without having to touch the DOM or use JavaScript. The methods covered here will follow these rules · Single element (no helper divs, but psuedo-elements are allowed) ... I proposed this challenge in the Animation at Work Slack and again on Twitter.
Slider Revolution
sliderrevolution.com › home › awesome css border animation examples to use
Awesome CSS Border Animation Examples to Use in Your Websites
January 27, 2026 - The following CSS border animation examples demonstrate how to create engaging interactive elements using modern CSS3 animation techniques. Each example has been tested for cross-browser compatibility across Chrome, Firefox, and Safari to ensure consistent rendering on all major platforms.
DevSnap
devsnap.me › css-border-animations
40+ CSS Border Animations (Free)
Check out these 100% Free HTML and CSS border animation examples. These are the best CSS3 border animations I could find.
Theowoo
theowoo.github.io › agbg
Animated Gradient Border Generator
Animated Gradient Border Generator · Examples: 0 1 2 3 4 5 · Background · Rectangle · Circle · Width · Height · Border Width · Border Radius · Two Tones
CodeTV
codetv.dev › blog › animated-css-gradient-border
Animated CSS gradient borders (no JavaScript, no hacks)
By specifying "<angle>", CSS knows how to interpolate changed values in animation, which means the animations can be smooth now. Update the conic-gradient() to use the custom property and add the animation — but let’s start out the animation as paused. We only want to set the animation-play-state to running when the element is hovered. ... Once you’ve made these changes, you should see the gradient borders and they’ll animate when you hover!
W3Schools
w3schools.com › cssref › css_animatable.php
CSS Animatable
accent-color align-content align-items align-self all animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function aspect-ratio backdrop-filter backface-visibility background background-attachment background-blend-mode background-clip background-color background-image background-origin background-position background-position-x background-position-y background-repeat background-size block-size border border-block border-block-color border-block-end border-block-end-color border-block-
Reddit
reddit.com › r/reactjs › creating an animated gradient border with css
r/reactjs on Reddit: Creating an animated gradient border with CSS
May 2, 2023 -
Hey everyone! I just published a new article on creating an animated gradient border using CSS. I've also included a version for Tailwind CSS users (with React and TypeScript too!).
I'm planning on writing more articles about design, UI, software, and other topics in the future. If you have any suggestions, feedback, or any cool ways you've used this effect in your projects please feel free to share! I'd love to hear your thoughts.
https://www.julienthibeaut.xyz/blog/create-animated-gradient-borders-with-css
Top answer 1 of 4
84
You can use a CSS3 transition for this. Have a look at this example:
http://jsfiddle.net/ujDkf/1/
Here is the main code:
#box {
position : relative;
width : 100px;
height : 100px;
background-color : gray;
border : 5px solid black;
-webkit-transition : border 500ms ease-out;
-moz-transition : border 500ms ease-out;
-o-transition : border 500ms ease-out;
transition : border 500ms ease-out;
}
#box:hover {
border : 10px solid red;
}
2 of 4
36
You can try this also...
button {
background: none;
border: 0;
box-sizing: border-box;
margin: 1em;
padding: 1em 2em;
box-shadow: inset 0 0 0 2px #f45e61;
color: #f45e61;
font-size: inherit;
font-weight: 700;
vertical-align: middle;
position: relative;
}
button::before, button::after {
box-sizing: inherit;
content: '';
position: absolute;
width: 100%;
height: 100%;
}
.draw {
-webkit-transition: color 0.25s;
transition: color 0.25s;
}
.draw::before, .draw::after {
border: 2px solid transparent;
width: 0;
height: 0;
}
.draw::before {
top: 0;
left: 0;
}
.draw::after {
bottom: 0;
right: 0;
}
.draw:hover {
color: #60daaa;
}
.draw:hover::before, .draw:hover::after {
width: 100%;
height: 100%;
}
.draw:hover::before {
border-top-color: #60daaa;
border-right-color: #60daaa;
-webkit-transition: width 0.25s ease-out, height 0.25s ease-out 0.25s;
transition: width 0.25s ease-out, height 0.25s ease-out 0.25s;
}
.draw:hover::after {
border-bottom-color: #60daaa;
border-left-color: #60daaa;
-webkit-transition: border-color 0s ease-out 0.5s, width 0.25s ease-out 0.5s, height 0.25s ease-out 0.75s;
transition: border-color 0s ease-out 0.5s, width 0.25s ease-out 0.5s, height 0.25s ease-out 0.75s;
}
<section class="buttons">
<button class="draw">Draw</button>
</section>