สร้างขอบไล่สี CSS
เลือกจุดสีแบบไลเนียร์หรือโคนิก ตั้งมุมโค้ง เลือกการ์ดแบบโปร่งใสหรือทึบ และเปิดตัวเลือกหมุนได้ ดูตัวอย่างบนพื้นหลังทั้งมืดและสว่าง แล้วส่งออกเป็น CSS ดิบหรือ Tailwind v4
.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;
}<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>
คำถามที่พบบ่อย
ทำขอบไล่สีมุมโค้งด้วย border-radius ใน CSS ได้อย่างไร
border-image ไม่รองรับ border-radius จึงต้องใช้เทคนิคอื่นเพื่อทำขอบไล่สีมุมโค้ง สำหรับการ์ดทึบ ให้ซ้อนพื้นหลังสองชั้น: สีพื้นทึบตัดตาม padding-box และไล่สีตัดตาม border-box พร้อมขอบโปร่งใส สำหรับการ์ดโปร่งใส ให้วาดไล่สีบนเลเยอร์ ::before แล้วเจาะตรงกลางด้วย mask-composite: exclude
ทำขอบไล่สีบนพื้นหลังโปร่งใสได้อย่างไร
ใช้เทคนิค mask-composite ใส่ไล่สีบน pseudo-element ::before พร้อม padding เท่าความกว้างของขอบ จากนั้นนำ mask สองชั้น (content-box และกล่องเต็ม) มาซ้อนด้วย exclude เพื่อให้เหลือแค่ขอบวงแหวน พื้นหลังการ์ดยังคงโปร่งใสทั้งหมด
ทำแอนิเมชันให้ขอบไล่สีหมุนได้อย่างไร
ลงทะเบียน custom property ด้วย @property --border-angle ให้เป็น <angle> แล้วใช้เป็นทิศทางของไล่สี (conic-gradient(from var(--border-angle), …)) จากนั้นทำแอนิเมชันด้วย @keyframes หากไม่มี @property เบราว์เซอร์จะคำนวณมุมระหว่างค่าไม่ได้ ขอบจึงกระโดดแทนที่จะหมุน
ใช้กับ Tailwind CSS v4 ได้ไหม
ได้ เครื่องมือสร้าง utility แบบ arbitrary value เช่น [background:…_padding-box,…_border-box] และ before:mask-exclude พร้อม animation token ของ @theme เมื่อเปิดการหมุน วาง markup และ snippet สำหรับแอนิเมชันลงใน globals.css
ขอบไล่สี CSS รองรับเบราว์เซอร์ใดบ้าง
รองรับเบราว์เซอร์หลักที่อัปเดตอยู่ mask-composite: exclude ใช้แบบไม่ต้องมี prefix ได้ใน Chrome 120+, Safari 15.4+ และ Firefox 53+ ส่วนบรรทัด -webkit-mask-composite: xor รองรับ WebKit รุ่นเก่า @property รองรับในเบราว์เซอร์ปัจจุบันทั้งหมด
More Free Design Tools
View all tools →Google Font Pairings Generator
16 curated Google Font heading + body pairings with live editable preview, Google Fonts link & Tailwind v4.
CSS Box Shadow Generator
Multi-layer CSS box-shadow studio with 8 curated presets, inset support & Tailwind utility export.
WCAG Color Contrast Checker
Check WCAG AA/AAA & UI contrast in HEX, RGB or OKLCH and auto-fix failing pairs in one click.
Retro Color Palette Generator
70s groove, 80s synthwave, 90s Memphis, Y2K Chrome, Mid-Century, Bauhaus & Kodak Film palettes.
Aesthetic Color Palette Generator
Matcha & Cream, Dark Academia, Japandi, Pastel Dream & harmony sliders with WCAG badges.
Brand Guidelines Generator
Build a live mini brand book and export HTML brand sheet, BRAND.md or CSS design tokens.
Tailwind v4 Palette Generator
Perceptually uniform 50–950 Tailwind v4 OKLCH scales and dark-mode palettes.
OKLCH Color Converter
Convert HEX to OKLCH and OKLCH to HEX with live Lightness, Chroma & Hue sliders.
CSS Glassmorphism Generator
Frosted-glass CSS & Tailwind v4 cards with live backdrop-filter blur and saturation.