Guest User

Untitled

a guest
Nov 21st, 2025
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5.77 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.     <title>Watercolor Gradient Effect</title>
  7.     <style>
  8.         /* Base Page Styles */
  9.         body {
  10.             margin: 0;
  11.             padding: 0;
  12.             background-color: #fdfdfd;
  13.             /* Simple dot pattern background like the reference image */
  14.             background-image: radial-gradient(#ccc 1px, transparent 1px);
  15.             background-size: 20px 20px;
  16.             font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  17.             display: flex;
  18.             justify-content: center;
  19.             align-items: center;
  20.             min-height: 100vh;
  21.             overflow: hidden;
  22.         }
  23.  
  24.         .container {
  25.             position: relative;
  26.             display: flex;
  27.             flex-direction: column;
  28.             gap: 40px;
  29.             padding: 50px;
  30.         }
  31.  
  32.         /* CORE WATERCOLOR TECHNIQUE
  33.            1. We create a base gradient.
  34.            2. We add 'blobs' using pseudo-elements to vary the color density.
  35.            3. We apply an SVG filter (defined in HTML) to distort the edges.
  36.         */
  37.  
  38.         .watercolor-strip {
  39.             position: relative;
  40.             width: 500px;
  41.             height: 120px;
  42.             border-radius: 20px; /* Soft corners */
  43.            
  44.             /* The SVG Filter is what gives it the 'wet' bleeding edge */
  45.             filter: url(#watercolor-distortion);
  46.            
  47.             /* Mix blend mode helps it look like dye on paper */
  48.             mix-blend-mode: multiply;
  49.             opacity: 0.9;
  50.         }
  51.  
  52.         /* --- TOP STRIP: Deep Blue to Dark Red --- */
  53.         .strip-1 {
  54.             /* Base horizontal flow */
  55.             background: linear-gradient(90deg,
  56.                 rgba(53, 46, 126, 0.9) 0%,
  57.                 rgba(80, 40, 100, 0.85) 40%,
  58.                 rgba(109, 24, 24, 0.9) 100%
  59.             );
  60.             box-shadow: 0 4px 15px rgba(53, 46, 126, 0.3);
  61.         }
  62.  
  63.         /* Internal blobs to make it look less like a computer gradient */
  64.         .strip-1::before {
  65.             content: '';
  66.             position: absolute;
  67.             top: -10px; left: 10px; right: 30%; bottom: -5px;
  68.             background: radial-gradient(circle at 30% 50%, rgba(53, 46, 126, 0.8), transparent 60%);
  69.             filter: blur(10px);
  70.             border-radius: 50%;
  71.         }
  72.         .strip-1::after {
  73.             content: '';
  74.             position: absolute;
  75.             top: 5px; left: 40%; right: -10px; bottom: 0px;
  76.             background: radial-gradient(circle at 70% 50%, rgba(140, 30, 30, 0.6), transparent 50%);
  77.             filter: blur(15px);
  78.             border-radius: 50%;
  79.         }
  80.  
  81.         /* --- BOTTOM STRIP: Terracotta to Deep Purple --- */
  82.         .strip-2 {
  83.             background: linear-gradient(90deg,
  84.                 rgba(166, 61, 51, 0.9) 5%,
  85.                 rgba(150, 50, 60, 0.85) 45%,
  86.                 rgba(69, 34, 73, 0.95) 100%
  87.             );
  88.             box-shadow: 0 4px 15px rgba(166, 61, 51, 0.3);
  89.         }
  90.  
  91.         .strip-2::before {
  92.             content: '';
  93.             position: absolute;
  94.             top: -5px; left: -5px; right: 50%; bottom: 5px;
  95.             background: radial-gradient(circle at 40% 50%, rgba(180, 70, 60, 0.7), transparent 70%);
  96.             filter: blur(8px);
  97.         }
  98.         .strip-2::after {
  99.             content: '';
  100.             position: absolute;
  101.             top: 10px; left: 50%; right: -5px; bottom: -10px;
  102.             background: radial-gradient(circle at 60% 60%, rgba(69, 34, 73, 0.8), transparent 60%);
  103.             filter: blur(12px);
  104.         }
  105.  
  106.         /* Paper Texture Overlay (Optional aesthetic touch) */
  107.         .texture-overlay {
  108.             position: fixed;
  109.             top: 0; left: 0; width: 100%; height: 100%;
  110.             pointer-events: none;
  111.             opacity: 0.4;
  112.             background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
  113.             mix-blend-mode: overlay;
  114.             z-index: 10;
  115.         }
  116.  
  117.         .label {
  118.             position: absolute;
  119.             top: -25px;
  120.             left: 0;
  121.             font-size: 14px;
  122.             color: #888;
  123.             font-weight: bold;
  124.             text-transform: uppercase;
  125.             letter-spacing: 1px;
  126.         }
  127.  
  128.     </style>
  129. </head>
  130. <body>
  131.  
  132.     <!-- This invisible SVG holds the filter definition -->
  133.     <svg style="position: absolute; width: 0; height: 0;">
  134.         <defs>
  135.             <filter id="watercolor-distortion" x="-20%" y="-20%" width="140%" height="140%">
  136.                 <!-- 1. Generate smooth noise -->
  137.                 <feTurbulence type="fractalNoise" baseFrequency="0.03" numOctaves="5" seed="5" result="noise" />
  138.                
  139.                 <!-- 2. Distort the source image using the noise -->
  140.                 <feDisplacementMap in="SourceGraphic" in2="noise" scale="15" xChannelSelector="R" yChannelSelector="G" />
  141.                
  142.                 <!-- 3. Blur edges slightly to merge pixels -->
  143.                 <feGaussianBlur stdDeviation="0.5" />
  144.             </filter>
  145.         </defs>
  146.     </svg>
  147.  
  148.     <div class="texture-overlay"></div>
  149.  
  150.     <div class="container">
  151.         <div class="watercolor-strip strip-1">
  152.             <div class="label">Gradient 1: Blue to Red</div>
  153.         </div>
  154.        
  155.         <div class="watercolor-strip strip-2">
  156.             <div class="label">Gradient 2: Rust to Purple</div>
  157.         </div>
  158.     </div>
  159.  
  160. </body>
  161. </html>
Advertisement
Add Comment
Please, Sign In to add comment