flavors
Hình ảnh3DCông cụBảng giáTài trợ
← Tất cả công cụ miễn phí của Flavors

Tạo viền gradient CSS

Tùy chỉnh điểm màu tuyến tính hoặc hình nón, góc bo tròn, thẻ trong suốt hoặc đục và tùy chọn xoay. Xem trước trên nền sáng và tối, xuất CSS thuần hoặc Tailwind v4.

Presets
Tối
Gói Pro$9/moRemix, REST + MCP, không quảng cáo.
Sáng
Gói Pro$9/moRemix, REST + MCP, không quảng cáo.
CSS thô
.gradient-border {
  border: 2px solid transparent;
  border-radius: 20px;
  background:
    linear-gradient(#0e0e11, #0e0e11) padding-box,
    linear-gradient(135deg, #ff5f6d 0%, #ffc371 50%, #a855f7 100%) border-box;
}
Tailwind v4
<div class="rounded-[20px] border-[2px] border-transparent [background:linear-gradient(#0e0e11,#0e0e11)_padding-box,linear-gradient(135deg,_#ff5f6d_0%,_#ffc371_50%,_#a855f7_100%)_border-box]">…</div>
Kỹ thuật
Gradient
Chuyển động
Các điểm dừng màu
#ff5f6d0%
#ffc37150%
#a855f7100%
Flavors Pro · $49/yr or $9/mo

Need a complete UI system around this border?

Pair this border with complete AI-ready UI design languages, 3D hero components, Tailwind v4 themes, and REST + MCP access.

Unlock full kits in Flavors ProSign in straight to $49/yr checkout

Câu hỏi thường gặp

Làm sao tạo viền gradient bo tròn bằng border-radius trong CSS?

border-image không hỗ trợ border-radius, nên viền gradient bo tròn cần dùng kỹ thuật khác. Với card có nền đục, xếp chồng hai lớp nền: lớp màu đặc cắt theo padding-box, lớp gradient cắt theo border-box, cùng viền trong suốt. Với card trong suốt, vẽ gradient trên lớp ::before rồi khoét phần giữa bằng mask-composite: exclude.

Làm sao tạo viền gradient trên nền trong suốt?

Dùng kỹ thuật mask-composite. Phần tử giả ::before mang gradient và có padding bằng độ rộng viền; sau đó kết hợp hai mask (content-box và toàn bộ hộp) bằng exclude để chỉ giữ lại vòng viền. Nền card vẫn trong suốt hoàn toàn.

Làm sao tạo hiệu ứng viền gradient xoay?

Đăng ký custom property bằng @property --border-angle với kiểu <angle>, dùng nó làm hướng gradient (conic-gradient(from var(--border-angle), …)), rồi tạo hiệu ứng chuyển động bằng @keyframes. Không có @property, trình duyệt không thể nội suy góc nên viền sẽ giật thay vì xoay mượt.

Có dùng được với Tailwind CSS v4 không?

Có. Công cụ xuất utility với giá trị tùy chỉnh như [background:…_padding-box,…_border-box] và before:mask-exclude, cùng token animation @theme khi bật hiệu ứng xoay. Dán markup và, nếu dùng animation, đoạn mã vào globals.css.

CSS tạo viền gradient được những trình duyệt nào hỗ trợ?

Hỗ trợ mọi trình duyệt evergreen. mask-composite: exclude được hỗ trợ không cần tiền tố trong Chrome 120+, Safari 15.4+ và Firefox 53+; dòng -webkit-mask-composite: xor hỗ trợ WebKit cũ hơn. @property chạy trên mọi trình duyệt hiện đại.

More Free Design Tools

View all tools →
16 Google Font pairs

Google Font Pairings Generator

16 curated Google Font heading + body pairings with live editable preview, Google Fonts link & Tailwind v4.

Open tool
5-layer shadows

CSS Box Shadow Generator

Multi-layer CSS box-shadow studio with 8 curated presets, inset support & Tailwind utility export.

Open tool
WCAG AA/AAA

WCAG Color Contrast Checker

Check WCAG AA/AAA & UI contrast in HEX, RGB or OKLCH and auto-fix failing pairs in one click.

Open tool
70s · 80s · 90s · Y2K

Retro Color Palette Generator

70s groove, 80s synthwave, 90s Memphis, Y2K Chrome, Mid-Century, Bauhaus & Kodak Film palettes.

Open tool
Curated moods & WCAG

Aesthetic Color Palette Generator

Matcha & Cream, Dark Academia, Japandi, Pastel Dream & harmony sliders with WCAG badges.

Open tool
HTML · BRAND.md · CSS

Brand Guidelines Generator

Build a live mini brand book and export HTML brand sheet, BRAND.md or CSS design tokens.

Open tool
50–950 OKLCH scales

Tailwind v4 Palette Generator

Perceptually uniform 50–950 Tailwind v4 OKLCH scales and dark-mode palettes.

Open tool
HEX ↔ OKLCH

OKLCH Color Converter

Convert HEX to OKLCH and OKLCH to HEX with live Lightness, Chroma & Hue sliders.

Open tool
Frosted glass CSS

CSS Glassmorphism Generator

Frosted-glass CSS & Tailwind v4 cards with live backdrop-filter blur and saturation.

Open tool

flavors · vibe không phải là template · © 2026

FlavorsHình ảnh3DCông cụ miễn phíBảng giáBlogGiới thiệuLiên hệTài trợNhật ký cập nhậtBáo lỗiCộng đồngQuyền riêng tưĐiều khoảnAffiliates
Popular toolsGoogle Font PairingsBox Shadow GeneratorColor Contrast CheckerRetro Color PaletteAesthetic PaletteBrand GuidelinesGradient Border CSS