October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

How to Create Glowing Effects with CSS

Create CSS glows for text, boxes, and transparent images with the right shadow property, practical examples, and readability guidance.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use text-shadow to glow text, box-shadow to glow a rectangular element, and filter: drop-shadow() when the glow should follow a transparent image or irregular silhouette. Layer subtle shadows for a softer halo, and keep text readable without relying on the glow.

Choose the right CSS glow

Technique Best for Shape followed Main controls
text-shadow Text and headings Letter shapes Horizontal and vertical offsets, blur radius, color; multiple comma-separated shadows
box-shadow Cards, buttons, panels Element’s rectangular frame Offsets, blur, spread, color; can be inset
filter: drop-shadow() Transparent PNGs, SVGs, irregular artwork Nontransparent pixels in the input image Offsets, blur, color; no spread or inset

The distinction matters for logos and icons: box-shadow can glow around the image element’s rectangular box, including transparent corners. drop-shadow() follows the image’s alpha silhouette instead. See MDN’s references for text-shadow, box-shadow, and drop-shadow().

Make glowing text

text-shadow adds shadows to text. Set both offsets to zero for an even halo, then layer a close shadow with wider, blurrier shadows to build a luminous effect:

.neon-text {
  color: #fff;
  text-shadow:
    0 0 0.15em #fff,
    0 0 0.45em #00eaff,
    0 0 1em #00aaff;
}

Each layer is written as horizontal offset, vertical offset, blur radius, and color. The first layer creates a tight core; the later layers extend the halo. Increase blur or add a layer for a broader glow, and adjust the colors to suit the background. Excessive blur can make letter edges harder to distinguish, so judge the result at the size and background where the text will appear.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
HTML and CSS: Design and Build Websites
  • HTML CSS Design and Build Web Sites
  • Comes with secure packaging
  • It can be a gift option

Glow a button, card, or panel

Use box-shadow when the glow belongs to an element’s rectangular frame. A close shadow plus a wider halo is a useful starting point:

.glow-card {
  box-shadow:
    0 0 0.25rem #00eaff,
    0 0 1rem #00aaff;
}

In each shadow, the first two values are the horizontal and vertical offsets, followed by blur, with color last. Add a spread value when you need the shadow to extend or contract beyond the frame; box-shadow also supports inset shadows, which appear inside the element. For a glow that should sit evenly around a button, keep the offsets at zero. Consult MDN’s box-shadow reference for the property’s syntax and options.

Make a glow follow an image or icon

For transparent artwork, use filter: drop-shadow() so the glow tracks its visible silhouette rather than a rectangular box. For example:

.glowing-icon {
  filter: drop-shadow(0 0 3px magenta);
}

The function takes offsets, blur, and color, but does not provide the spread or inset controls available with box-shadow. It can also be applied to other elements; MDN’s filter guide shows a glow on a heading: h1 { color: midnightblue; filter: drop-shadow(0 0 3px magenta); }. See MDN’s guide to using filter effects for context.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Web Design with HTML, CSS, JavaScript and jQuery Set
  • Brand: Wiley
  • Set of 2 Volumes
  • A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers

Keep glow effects readable and comfortable

Check contrast without counting the glow

A glow is decoration, not a substitute for readable foreground and background colors. Check the text against its actual background: WCAG 2.2 specifies a minimum contrast ratio of 4.5:1 for normal text and 3:1 for large text, subject to the criterion’s exceptions. Use the W3C WAI explanation of Contrast (Minimum) for the full requirements.

Honor reduced-motion preferences

If a glow pulses or changes over time, turn off nonessential animation when a visitor requests reduced motion:

@media (prefers-reduced-motion: reduce) {
  .pulsing-glow {
    animation: none;
  }
}

MDN explains the prefers-reduced-motion media query and its accessibility use.

Troubleshoot common glow problems

  • The glow looks like a rectangle around an icon. The effect is following the element’s box. Try filter: drop-shadow() if you want it to follow the visible alpha silhouette.
  • The text looks blurred or difficult to read. Reduce the blur or remove an outer shadow layer, and verify the text/background contrast independently of the effect.
  • The glow is displaced to one side. Check the first two values in the shadow: they control horizontal and vertical offsets. Use zero offsets for an even halo.
  • You need an inset or spread effect on an irregular image. drop-shadow() does not have spread or inset parameters. Use box-shadow if the rectangular frame is acceptable, or keep the silhouette-following effect without those controls.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

To inspect a page with its CSS glow in a screenshot, you can render a URL with ScreenshotNeo. Its cleanup steps accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be disabled. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers identify the page verdict and billing status. It also offers an MCP server for AI agents, with tools for taking screenshots, getting page information, and capturing PDFs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

One-call cURL example, using the documented ScreenshotNeo API:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo provides 1,000 screenshots per month free with no card; paid plans start at $5 for 3,000 screenshots. Get started with the free ScreenshotNeo sign-up.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.