# Background Size

Published articles for Background Size.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Striped Backgrounds in CSS (Horizontal, Vertical, Diagonal)

DevFeed: [Striped Backgrounds in CSS (Horizontal, Vertical, Diagonal)](<https://devfeed.tech/articles/striped-backgrounds-in-css-horizontal-vertical-diagonal-110085.md>)

Original publisher: [Read original article](<https://markodenic.com/css-striped-background/>)

Author: Marko

Published: 2026-10-31T09:00:00Z

Content type: tutorial

Language: en

Sources: [Marko Denic Blog](<https://devfeed.tech/sources/marko-denic-blog.md>)

Topics: [CSS](<https://devfeed.tech/topics/css.md>), [web animation](<https://devfeed.tech/topics/web-animation.md>), [Media Queries](<https://devfeed.tech/topics/media-queries.md>)

Tags: [animation](<https://devfeed.tech/tags/animation.md>), [background-size](<https://devfeed.tech/tags/background-size.md>), [css](<https://devfeed.tech/tags/css.md>), [css-gradients](<https://devfeed.tech/tags/css-gradients.md>), [examples](<https://devfeed.tech/tags/examples.md>), [progress](<https://devfeed.tech/tags/progress.md>), [tables](<https://devfeed.tech/tags/tables.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>), [vertical](<https://devfeed.tech/tags/vertical.md>), [web-development](<https://devfeed.tech/tags/web-development.md>)

### AI overview

CSS stripes use hard color stops in gradients to create sharp edges, with `repeating-linear-gradient()` as the main method. The default direction creates horizontal stripes; `90deg` makes them vertical, and other angles create diagonal stripes. Set stop positions to adjust stripe widths. A tiled `linear-gradient()` with `background-size` also works for horizontal and vertical stripes and makes spacing easy to change, while repeating gradients produce seamless diagonals. The excerpt also shows layering translucent stripes over colors or images, using `:nth-child(even)` for zebra table rows, and animating a striped progress bar by one stripe period; it disables that animation for users who prefer reduced motion. Angled hard edges may appear jagged, and the article suggests a roughly one-pixel blend between colors to smooth them.

### Source excerpt

Create striped backgrounds with pure CSS gradients: horizontal, vertical and diagonal stripes, pinstripes, zebra-striped tables and an animated striped progress bar. Copy-paste examples.

## CSS radial-gradient(): Syntax and Examples

DevFeed: [CSS radial-gradient(): Syntax and Examples](<https://devfeed.tech/articles/css-radial-gradient-syntax-and-examples-98737.md>)

Original publisher: [Read original article](<https://markodenic.com/radial-gradient-css/>)

Author: Marko

Published: 2026-10-24T09:00:00Z

Content type: article

Language: en

Sources: [Marko Denic Blog](<https://devfeed.tech/sources/marko-denic-blog.md>)

Topics: [CSS](<https://devfeed.tech/topics/css.md>)

Tags: [animate](<https://devfeed.tech/tags/animate.md>), [background](<https://devfeed.tech/tags/background.md>), [background-image](<https://devfeed.tech/tags/background-image.md>), [background-size](<https://devfeed.tech/tags/background-size.md>), [calc](<https://devfeed.tech/tags/calc.md>), [circle](<https://devfeed.tech/tags/circle.md>), [color](<https://devfeed.tech/tags/color.md>), [conic-gradient](<https://devfeed.tech/tags/conic-gradient.md>), [css](<https://devfeed.tech/tags/css.md>), [css-gradients](<https://devfeed.tech/tags/css-gradients.md>), [dots](<https://devfeed.tech/tags/dots.md>), [examples](<https://devfeed.tech/tags/examples.md>), [faq](<https://devfeed.tech/tags/faq.md>), [glow](<https://devfeed.tech/tags/glow.md>), [gradient](<https://devfeed.tech/tags/gradient.md>), [gradient-generator](<https://devfeed.tech/tags/gradient-generator.md>), [pattern](<https://devfeed.tech/tags/pattern.md>), [position](<https://devfeed.tech/tags/position.md>), [size](<https://devfeed.tech/tags/size.md>), [syntax](<https://devfeed.tech/tags/syntax.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>), [web-development](<https://devfeed.tech/tags/web-development.md>)

### AI overview

CSS `radial-gradient()` creates an image whose colors spread outward from a point, usable in `background` or `background-image`. Its default is a centered ellipse reaching the farthest corner; choose `circle` to keep it round, size it with edge-based keywords or lengths, and move its center with `at` plus keywords, percentages, or lengths. Color stops can blend smoothly or share a position for a hard edge; a small gap between hard stops can reduce jagged edges. Examples show layered glows and photo vignettes, repeated dot patterns using `background-size`, and outward rings with `repeating-radial-gradient()`. The article says gradients themselves are not directly animatable, suggesting animation of background position or size, or a registered custom property inside the gradient.

### Source excerpt

How CSS radial-gradient() works: circle vs ellipse, size keywords, position, color stops, repeating gradients, and copy-paste examples for glows, spotlights, dot patterns and vignettes.

## Fit height to background pattern size with calc-size()

DevFeed: [Fit height to background pattern size with calc-size()](<https://devfeed.tech/articles/fit-height-to-background-pattern-size-with-calc-size-87686.md>)

Original publisher: [Read original article](<https://ishadeed.com/article/fit-height-background-pattern-calc-size/>)

Author: Ahmad Shadeed

Published: 2026-10-15T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ahmad Shadeed](<https://devfeed.tech/sources/ahmad-shadeed.md>)

Topics: [human computer interaction](<https://devfeed.tech/topics/human-computer-interaction.md>), [web graphics](<https://devfeed.tech/topics/web-graphics.md>)

Tags: [background-size](<https://devfeed.tech/tags/background-size.md>), [calc](<https://devfeed.tech/tags/calc.md>), [css](<https://devfeed.tech/tags/css.md>)

### AI overview

A CSS tutorial shows how to align a repeating background pattern with a section's height using calc-size() and round(). It notes that the approach works in Chrome and Edge but is unavailable in Firefox and Safari, and demonstrates rounding the height and padding to multiples of the pattern tile height.

### Source excerpt

## The problem I have a section with a background pattern that repeats on both axes. I wanted the vertical repeat to be aligned with the pattern's height, so the pattern won't have cut-offs. Take the following design. ``` .section { --tile-width: 52px; --tile-height: 44px; background-image: url("pattern.png"); background-size: var(--tile-width) var(--tile-height); } ``` The Espresso Guide Everything you need to pull a great shot at home: picking the right beans, dialing in your grind size.

## Understanding CSS Multiple Backgrounds

DevFeed: [Understanding CSS Multiple Backgrounds](<https://devfeed.tech/articles/understanding-css-multiple-backgrounds-45297.md>)

Original publisher: [Read original article](<https://ishadeed.com/article/css-multiple-backgrounds/>)

Author: Ahmad Shadeed

Published: 2020-07-22T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ahmad Shadeed](<https://devfeed.tech/sources/ahmad-shadeed.md>)

Topics: [CSS](<https://devfeed.tech/topics/css.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [background](<https://devfeed.tech/tags/background.md>), [background-attachment](<https://devfeed.tech/tags/background-attachment.md>), [background-image](<https://devfeed.tech/tags/background-image.md>), [background-longhand](<https://devfeed.tech/tags/background-longhand.md>), [background-size](<https://devfeed.tech/tags/background-size.md>), [browser](<https://devfeed.tech/tags/browser.md>), [css](<https://devfeed.tech/tags/css.md>), [css-backgrounds](<https://devfeed.tech/tags/css-backgrounds.md>), [css-properties](<https://devfeed.tech/tags/css-properties.md>), [developers](<https://devfeed.tech/tags/developers.md>), [examples](<https://devfeed.tech/tags/examples.md>), [explainer](<https://devfeed.tech/tags/explainer.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [layer](<https://devfeed.tech/tags/layer.md>), [multiple](<https://devfeed.tech/tags/multiple.md>)

### AI overview

A tutorial on CSS multiple backgrounds explains the background shorthand, positioning and sizing layers, and how to combine multiple background layers with visual examples.

### Source excerpt

CSS is one of the most used CSS properties. However, using multiple backgrounds is still not well known across all developers. I will hugely focus on the potential of using multiple backgrounds and leverage the CSS to its full power. In this article, I will explain the property in detail, and provide a visual explainer on how we can stack multiple backgrounds, and the actual benefit of it. Of course, there will be some visual examples, you're in for a treat!

## Checkerboard, striped & other background patterns with CSS3 gradients

DevFeed: [Checkerboard, striped & other background patterns with CSS3 gradients](<https://devfeed.tech/articles/checkerboard-striped-other-background-patterns-with-css3-gradients-51982.md>)

Original publisher: [Read original article](<https://lea.verou.me/2010/12/checkered-stripes-other-background-patterns-with-css3-gradients/>)

Author: Lea Verou

Published: 2010-12-22T00:00:00Z

Content type: article

Language: en

Sources: [Lea Verou's blog](<https://devfeed.tech/sources/lea-verou-s-blog.md>)

Topics: [CSS](<https://devfeed.tech/topics/css.md>), [HTML](<https://devfeed.tech/topics/html.md>), [selectors](<https://devfeed.tech/topics/selectors.md>), [browser](<https://devfeed.tech/topics/browser.md>)

Tags: [background](<https://devfeed.tech/tags/background.md>), [background-image](<https://devfeed.tech/tags/background-image.md>), [background-size](<https://devfeed.tech/tags/background-size.md>), [blog](<https://devfeed.tech/tags/blog.md>), [browsers](<https://devfeed.tech/tags/browsers.md>), [css](<https://devfeed.tech/tags/css.md>), [css-images](<https://devfeed.tech/tags/css-images.md>), [css-values](<https://devfeed.tech/tags/css-values.md>), [css3](<https://devfeed.tech/tags/css3.md>), [effect](<https://devfeed.tech/tags/effect.md>), [fallback](<https://devfeed.tech/tags/fallback.md>), [gradient](<https://devfeed.tech/tags/gradient.md>), [linear](<https://devfeed.tech/tags/linear.md>), [make](<https://devfeed.tech/tags/make.md>), [mozilla](<https://devfeed.tech/tags/mozilla.md>), [multiple](<https://devfeed.tech/tags/multiple.md>), [multiple-backgrounds](<https://devfeed.tech/tags/multiple-backgrounds.md>), [opera](<https://devfeed.tech/tags/opera.md>), [original](<https://devfeed.tech/tags/original.md>), [pattern](<https://devfeed.tech/tags/pattern.md>), [patterns](<https://devfeed.tech/tags/patterns.md>), [spec](<https://devfeed.tech/tags/spec.md>), [stop](<https://devfeed.tech/tags/stop.md>), [support](<https://devfeed.tech/tags/support.md>), [syntax](<https://devfeed.tech/tags/syntax.md>), [tips](<https://devfeed.tech/tags/tips.md>), [transparent](<https://devfeed.tech/tags/transparent.md>)

### AI overview

CSS3 gradients can create repeating stripe and picnic-style backgrounds without images by placing color stops at the same position for a sharp transition, setting a background color as both a stripe color and fallback, and using background-size to control the tile. The picnic pattern overlays horizontal and vertical stripes. The described checkerboard instead uses four diagonal gradients, each contributing part of the dark squares; the author says a regular, non-diagonal checkerboard would require too many gradients, and notes conical gradients were not then supported or in the spec. The excerpt lists WebKit, Firefox 3.6+, Opera 11.50+ and IE10+ for the demo.

### Source excerpt

You're probably familiar with CSS3 gradients by now, including the closer to the standard Mozilla syntax and the ugly verbose Webkit one. I assume you know how to add multiple color stops, make your gradients angled or create radial gradients. What you might not be aware of, is that CSS3 gradients can be used to create many kinds of commonly needed patterns, including checkered patterns, stripes and more. View demo (Works in Webkit, Firefox 3.6+, Opera 11.50+ and IE10+) The main idea behind the technique is the following, taken from the CSS3 Images spec: If multiple color-stops have the same position, they produce an infinitesimal transition from the one specified first in the rule to the one specified last. In effect, the color suddenly changes at that position rather than smoothly transitioning. I guess this makes it obvious how to create the tile for the stripes (unless you've never created a striped background before, but teaching you this is beyond the scope of this post). For example the gradient for the horizontal stripes is: background-color: #0ae; background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(.5, rgba(255, 255, 255, .2)), color-stop(.5, transparent), to(transparent)); background-image: -moz-linear-gradient(rgba(255, 255, 255, .2) 50%, transparent 50%, transparent); background-image: -o-linear-gradient(rgba(255, 255, 255, .2) 50%, transparent 50%, transparent); background-image: linear-gradient(rgba(255, 255, 255, .2) 50%, transparent 50%, transparent); Why transparent instead of the actual colors we want? For flexibility. background-color serves two purposes here: Setting the color of half the stripes and serving as a fallback for browsers that don't support gradients. However, without anything else, the tile will occupy the whole container. To control the size of each tile, you can use background-size: -webkit-background-size: 50px 50px; -moz-background-size: 50px 50px; background-size: 50px 50px; To create the picnic-style pattern, yo