CSS GENERATOR

CSS generator, tweak it and copy the code.

Adjust shadow and gradient visually, preview live on the right, then copy the CSS in one click. Everything runs locally in your browser.

Shadow (box-shadow)

Shadow preview
box-shadow: 0px 12px 30px 0px rgba(0, 0, 0, 0.35);

Gradient (linear-gradient)

background: linear-gradient(135deg, #5b7cff, #9b5bff);

Most tools process data locally; see this page for details

What does this tool do?

Some CSS properties — especially box-shadow — take many parameters and are easy to mistype. This tool lets you adjust them visually with sliders and color pickers, then generates paste-ready CSS in real time. Copy the result to your clipboard with one click.

FAQ

What do the six box-shadow values mean?

In order: X offset (horizontal, positive moves right), Y offset (vertical, positive moves down), blur radius (larger is softer, zero gives a hard edge), spread radius (positive grows the shadow, negative pulls it in), and colour. The first three cover almost every case, e.g. box-shadow: 2px 4px 8px rgba(0,0,0,.2) for a soft shadow.

How do I stack multiple shadows so they look natural?

Use two layers: one tight to the element with a small blur and higher opacity to fake contact shadow, and one with a large offset and large blur at lower opacity for ambient shadow — e.g. 0 1px 2px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.12). More than three layers usually looks dirty.

Why does the generated CSS not show up?

Three common causes: ① the CSS ended up inside a tag with no styling — a <style> block must sit directly in the page; ② a missing semicolon after a property; ③ malformed comma-separated colour syntax. The generator emits standard syntax, so if it still fails, check the browser's computed panel to see whether another rule is overriding the property.

示例与注意事项Example & notes

一个例子A worked example

调圆角、阴影与渐变,右侧实时生成可粘贴的 CSS,省掉手写试错的来回。Tune radius, shadow and gradient while the CSS updates live on the right, removing trial-and-error.

注意事项Things to watch

相关问答More Q&A

能一键复制代码吗?Is there a copy button?

可以,代码块右上角有复制按钮,复制的是纯 CSS。Yes — the copy button in the corner copies clean CSS.

能生成 Tailwind 类名吗?Can it output Tailwind classes?

目前输出原生 CSS,便于直接落库或加进样式文件。It outputs plain CSS, which drops straight into a stylesheet.

Further reading

觉得好用?Found it useful?