Open In App

How to Design Stitched Glowing Effect for Button using HTML and CSS ?

Last Updated : 14 May, 2020
Like Article

The stitched glowing effect is generally used in the design of classical or retro-themed websites. You can also call it a Denim effect if you use blue color for the effect as it looks similar to the classic original denim. It is one of the best effect to understand the concept of radial-gradient and dashed property of border.

Approach: The approach is simple, we will use the dashed property for stitch effect and radial-gradient for the glow effect. The below code is the implementation of the above approach.


<!DOCTYPE html>
<html lang="en">
  <meta charset="UTF-8">
  <meta name="viewport" content=
  <title>Stiched Effect</title>
      margin: 0;
      padding: 0;
      background: green;
      position: absolute;
      top: 35%;
      left: 30%;
      color: whitesmoke;
      background: radial-gradient(
          rgb(64, 245, 64), green);
      padding:20px 10px;
      border-radius: 30px;
      border: 2px dashed white;
  <button class="geeks">

In the above example, we have a <h1> element and first we align it to center of the page and then apply radial-gradient property to give it a glow effect and border dashed property to give stitch effect. Border-radius is completely optional and use of it comes to personal preferences.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads