Skip to main content
CSS-Tricks
  • Articles
  • Videos
  • Almanac
  • Newsletter
  • Guides
  • DigitalOcean
  • DO Community
Search

Articles Tagged
gradients

38 Articles
{
,

}
Direct link to the article Add a CSS Lens Flare to Photos for a Bright Touch
design gradients

Add a CSS Lens Flare to Photos for a Bright Touch

I’m a big fan of movies by J.J. Abrams. I enjoy their tight plots, quippy dialog, and of course: anamorphic lens flares. Filmmakers like Abrams use lens flare to add a dash of ‘homemade’ realism to their movies, …

Avatar of Shimin Zhang
Shimin Zhang on Apr 12, 2022
Direct link to the article Tricks to Cut Corners Using CSS Mask and Clip-Path Properties
clip-path css shapes gradients mask

Tricks to Cut Corners Using CSS Mask and Clip-Path Properties

We recently covered creating fancy borders with CSS mask properties, and now we are going to cut the corners with CSS mask and clip-path! A lot of techniques exist to cut different shapes from the corners of any element. …

Avatar of Temani Afif
Temani Afif on Mar 30, 2022 (Updated on Aug 11, 2022)
Direct link to the article Using Different Color Spaces for Non-Boring Gradients
color easing gradients

Using Different Color Spaces for Non-Boring Gradients

Direct Link

A little gradient generator tool from Tom Quinonero. You’d think fading one color to another would be an obvious, simple, solved problem — it’s actually anything but!

Tom’s generator does two things that help make a gradient better:

  1. You
…
Avatar of Chris Coyier
Shared by Chris Coyier on Feb 7, 2022
Direct link to the article Fancy CSS Borders Using Masks
borders gradients mask

Fancy CSS Borders Using Masks

Have you ever tried to make CSS borders in a repeating zig-zag pattern? Like where a colored section of a website ends and another differently colored section begins — not with a straight line, but angled zig zags, rounded humps, …

Avatar of Temani Afif
Temani Afif on Jan 26, 2022 (Updated on Sep 29, 2022)
Direct link to the article CSS-ing Candy Ghost Buttons
background-clip border-image buttons clip-path ghost buttons gradients mask mask-clip mask-composite mix-blend-mode

CSS-ing Candy Ghost Buttons

Recently, while looking for some ideas on what to code as I have zero artistic sense so the only thing I can do is find pretty things that other people have come up with and remake them with clean and …

Avatar of Ana Tudor
Ana Tudor on Oct 31, 2021
Direct link to the article Grainy Gradients
background filter gradients svg filters

Grainy Gradients

Browse through Dribbble or Behance, and you’ll find designers using a simple technique to add texture to an image: noise. Adding noise makes otherwise solid colors or smooth gradients, such as shadows, more realistic. But despite designers’ affinity for texture, …

Avatar of Jimmy Chion
Jimmy Chion on Sep 13, 2021 (Updated on Sep 14, 2021)
Direct link to the article Animating a CSS Gradient Border
@property border css animation gradients

Animating a CSS Gradient Border

Direct Link

This little trick for gradient borders is super useful:

.border-gradient {
  border: 5px solid;
  border-image-slice: 1;
  border-image-source: linear-gradient(to left, #743ad5, #d53a9d);
}

Here’s some basic demos from our article on the subject. Sephanie Eckles was sharing around the idea …

Avatar of Chris Coyier
Shared by Chris Coyier on Feb 8, 2021
Direct link to the article No-Jank CSS Stripes
gradients repeating gradient

No-Jank CSS Stripes

My mind goes immediately to repeating-linear-gradient and hard-stop gradients when thinking of creating stripes in CSS. You make one stripe by using the same color between two color stops, and another stripe (or more) but using a different color …

Avatar of Chris Coyier
Chris Coyier on Feb 1, 2021
Direct link to the article USA.css
gradients

USA.css

Direct Link

Lots of fun with gradients from Bennett Feely: stars, stripes, banners, bursts… I love being able to use nice patterns with either no image requests at all, or very little SVG.

Reminder: Bennett does all sorts of cool stuff. …

Avatar of Chris Coyier
Shared by Chris Coyier on Jul 5, 2020
Direct link to the article How-to guide for creating edge-to-edge color bars that work with a grid
gradients

How-to guide for creating edge-to-edge color bars that work with a grid

Direct Link

Hard-stop gradients are one of my favorite CSS tricks. Here, Marcel Moreau combines that idea with CSS grid to solve an issue that’s otherwise a pain in the butt. Say you have like a 300px right sidebar on a desktop …

Avatar of Chris Coyier
Shared by Chris Coyier on Jul 1, 2020
Direct link to the article When Sass and New CSS Features Collide
calc css variables custom properties filter gradients max min Sass

When Sass and New CSS Features Collide

Recently, CSS has added a lot of new cool features such as custom properties and new functions. While these things can make our lives a lot easier, they can also end up interacting with preprocessors, like Sass, in funny …

Avatar of Ana Tudor
Ana Tudor on Jun 29, 2020
  • Newer
  • 1
  • 2
  • 3
  • ...
  • 4
  • Older

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • DigitalOcean
  • DigitalOcean Community
  • About DigitalOcean
  • Legal
  • Free Credit Offer
CSS-Tricks
  • Email
  • Guest Writing
  • Book
  • Advertising
Follow
  • Mastodon
  • Twitter
  • Instagram
  • YouTube
  • CodePen
  • iTunes
  • RSS
Back to Top