Lädt...


🔧 Gradient text for your website in 5 methods


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

In this article, I will show you a couple of ways to get gradient text using CSS (and some without CSS). You may already be familiar with one of the methods.

HTML for method - 1, 2 and 3

<h1>Sub to Axorax on YT!</h1>

Method - 1 (CSS)

h1 {
  background: -webkit-linear-gradient(#e28bfc, #8bb8fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

Method - 2 (CSS)

h1 {
  background: linear-gradient(#e28bfc, #8bb8fc);
  background-clip: text;
  color: transparent;
}

Method - 3 (CSS clip-path)

h1 {
  position: relative;
  display: inline-block;
}

h1::before {
  content: "Sub to Axorax on YT!";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(#e28bfc, #8bb8fc);
  -webkit-background-clip: text;
  color: transparent;
  clip-path: text;
}

Method - 4 (SVG)

<svg width="100%" height="100%">
  <defs>
    <linearGradient id="gradient" x1="0%" y1="0%" x2="100%" y2="0%">
      <stop offset="0%" style="stop-color:#e28bfc;stop-opacity:1" />
      <stop offset="100%" style="stop-color:#8bb8fc;stop-opacity:1" />
    </linearGradient>
  </defs>
  <text x="10" y="50" font-size="72" fill="url(#gradient)">Gradient Text</text>
</svg>

Method - 5 (HTML canvas)

<canvas id="canvas" width="800" height="200"></canvas>

<script>
  const canvas = document.getElementById('canvas');
  const ctx = canvas.getContext('2d');
  ctx.font = '3rem sans-serif';
  const gradient = ctx.createLinearGradient(0, 0, canvas.width, 0);
  gradient.addColorStop(0, '#e28bfc');
  gradient.addColorStop(1, '#8bb8fc');
  ctx.fillStyle = gradient;
  ctx.fillText('Sub to Axorax on YT!', 10, 100);
</script>

Hope you found something useful!

...

🔧 Gradient text for your website in 5 methods


📈 41.39 Punkte
🔧 Programmierung

📰 Gradient AI Introduces Llama-3 8B Gradient Instruct 1048k: Setting New Standards in Long-Context AI


📈 31.51 Punkte
🔧 AI Nachrichten

📰 Policy Gradient Methods in Reinforcement Learning


📈 25.56 Punkte
🔧 AI Nachrichten

📰 Why do Policy Gradient Methods work so well in Cooperative MARL? Evidence from Policy Representation


📈 25.56 Punkte
🔧 AI Nachrichten

🔧 Set Image or Gradient as Text Background in CSS 😎


📈 22.64 Punkte
🔧 Programmierung

🔧 Quick Tip: How to Add Gradient Effects and Patterns to Text


📈 22.64 Punkte
🔧 Programmierung

🔧 Perfectly Contrasting Text on a Gradient Background


📈 22.64 Punkte
🔧 Programmierung

🔧 Create a Gradient Text Reveal on Scroll with Tailwind CSS and JS


📈 22.64 Punkte
🔧 Programmierung

🔧 Creating an animated text gradient with Tailwind CSS (and vanilla CSS)


📈 22.64 Punkte
🔧 Programmierung

🪟 How to warp a Gradient with Text in Photoshop


📈 22.64 Punkte
🪟 Windows Tipps

🔧 Create a gradient text effect like Vercel with CSS


📈 22.64 Punkte
🔧 Programmierung

🔧 Simple Gradient Clip Text


📈 22.64 Punkte
🔧 Programmierung

🔧 How To Add Animated Gradient Text in Elementor?


📈 22.64 Punkte
🔧 Programmierung

🔧 Flutter - Colorful Gradient Text


📈 22.64 Punkte
🔧 Programmierung

🔧 Flutter - Colorful Gradient Text


📈 22.64 Punkte
🔧 Programmierung

🔧 Gradient animated text with Tailwind CSS


📈 22.64 Punkte
🔧 Programmierung

🔧 How to Integrate OpenAI for Text Generation, Text-to-Speech, and Speech-to-Text in .NET


📈 20.64 Punkte
🔧 Programmierung

🔧 Facing an issue in froala text editor, style of the text is lost when the text is cut


📈 20.64 Punkte
🔧 Programmierung

🍏 Plain Text Editor 1.2.1 - Simple distraction-free text editor without any rich text nonsense.


📈 20.64 Punkte
🍏 iOS / Mac OS

🔧 JavaScript Array Methods Examples: A Comprehensive Guide (31 Methods)


📈 19.61 Punkte
🔧 Programmierung

🔧 Class Methods vs Instance Methods in Python: Why, When, and How to Use Them


📈 19.61 Punkte
🔧 Programmierung

🔧 JavaScript Array Methods, String Methods, & Math.random()


📈 19.61 Punkte
🔧 Programmierung

🕵️ Eight Foolproof Methods of Securing Your Website


📈 18.75 Punkte
🕵️ Hacking

📰 Website Mirroring With HTTrack Website Copier| Website Hacking #2


📈 18.69 Punkte
📰 IT Security Nachrichten

🔧 Elevate Your Web Design with Codepem's CSS Gradient Generator


📈 18.48 Punkte
🔧 Programmierung

matomo