<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/glowing-border-animation-with-a-smooth-stop-hmuydltqw" -->

---
title: Glowing border animation with a smooth stop | daily.dev
description: Learn how to add a glowing border animation around an element using modern CSS techniques like `@property`, CSS Mask, and Math functions. The animation is...
canonical: https://daily.dev/posts/glowing-border-animation-with-a-smooth-stop-hmuydltqw
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Glowing border animation with a smooth stop | daily.dev
og:description: Learn how to add a glowing border animation around an element using modern CSS techniques like `@property`, CSS Mask, and Math functions. The animation is...
og:url: https://daily.dev/posts/glowing-border-animation-with-a-smooth-stop-hmuydltqw
og:image: https://api.daily.dev/og/posts/hmUYDLTqW.png
og:image:alt: Glowing border animation with a smooth stop
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Glowing border animation with a smooth stop

**[CSS Tip](https://daily.dev/sources/csstip)** · 1 min read · 75 upvotes · 5 comments

## Summary

Learn how to add a glowing border animation around an element using modern CSS techniques like `@property`, CSS Mask, and Math functions. The animation is infinite on hover and stops smoothly when the mouse leaves the element.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://css-tip.com/glowing-border/>

## Community discussion

Top comments from developers on daily.dev.

**@ed1nh0** · 5 upvotes

> Remembering that era when all I want was just the `border-radius` property to get rid of those transparent rounded GIFs... 🥹

**@matthiasmeister** · 0 upvotes

> It’s really soothing to look at 🫠

**@artificialxdev** · 0 upvotes

> wow

**@djariss** · 0 upvotes

> Cool...

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#css](https://daily.dev/tags/css), [#frontend](https://daily.dev/tags/frontend)

[View this post on daily.dev](https://daily.dev/posts/glowing-border-animation-with-a-smooth-stop-hmuydltqw)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Glowing border animation with a smooth stop","url":"https://daily.dev/posts/glowing-border-animation-with-a-smooth-stop-hmuydltqw","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/glowing-border-animation-with-a-smooth-stop-hmuydltqw"},"datePublished":"2024-12-03T11:00:58.061Z","dateModified":"2024-12-08T21:21:33.976Z","description":"Learn how to add a glowing border animation around an element using modern CSS techniques like `@property`, CSS Mask, and Math functions. The animation is...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/622b98bb7853d112cf1c92f580dc6c3b?_a=AQAEuj9","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/622b98bb7853d112cf1c92f580dc6c3b?_a=AQAEuj9","isAccessibleForFree":true,"articleSection":"CSS Tip","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"CSS Tip","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/5d335233e7894c2ea997aa89e1724200","url":"https://daily.dev/sources/csstip"},"commentCount":5,"discussionUrl":"https://daily.dev/posts/glowing-border-animation-with-a-smooth-stop-hmuydltqw","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":75},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":5}],"keywords":"webdev,css,frontend","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"CSS Tip","item":"https://daily.dev/sources/csstip"},{"@type":"ListItem","position":3,"name":"Glowing border animation with a smooth stop"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/glowing-border-animation-with-a-smooth-stop-hmuydltqw","comment":[{"@type":"Comment","text":"Remembering that era when all I want was just the border-radius property to get rid of those transparent rounded GIFs… 🥹","datePublished":"2024-12-03T11:44:27.726Z","url":"https://daily.dev/posts/hmUYDLTqW#c-IA6vkPW7B","author":{"@type":"Person","name":"Edson Simão Jr","url":"https://daily.dev/ed1nh0","image":"https://media.daily.dev/image/upload/s--X_mpCbNx--/f_auto/v1763031241/avatars/avatar_OOw9XxPIvvQflUj8Ikoxq?_a=BAMAK+ZW0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":5}},{"@type":"Comment","text":"It’s really soothing to look at 🫠","datePublished":"2025-01-08T06:59:33.257Z","url":"https://daily.dev/posts/hmUYDLTqW#c-XPA3J3sXR","author":{"@type":"Person","name":"Matthias Meister","url":"https://daily.dev/matthiasmeister","image":"https://lh3.googleusercontent.com/a/ACg8ocKhg3ZjnVps349_xD84qa0MjBTOFH6sjc_qL4m1Kkeyum-uqxytcg=s96-c"}},{"@type":"Comment","text":"wow","datePublished":"2025-02-03T10:41:47.573Z","url":"https://daily.dev/posts/hmUYDLTqW#c-06WgM4oNp","author":{"@type":"Person","name":"ArtificialXDev","url":"https://daily.dev/artificialxdev","image":"https://media.daily.dev/image/upload/s--10I8gNy4--/f_auto/v1738335806/avatars/avatar_qCi2TbEwnxyShm3Bt5K8y"}},{"@type":"Comment","text":"Cool…","datePublished":"2025-01-21T10:53:06.618Z","url":"https://daily.dev/posts/hmUYDLTqW#c-HVEdNvba4","author":{"@type":"Person","name":"Davor Veselinovic","url":"https://daily.dev/djariss","image":"https://avatars2.githubusercontent.com/u/11005276?v=4"}}]}
```

