Beispiel:SVG-Filter-16.html

Aus SELFHTML-Wiki
Wechseln zu: Navigation, Suche
<!DOCTYPE html>
<html lang="de">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0;" />
  <link rel="stylesheet" type="text/css" media="screen" href="./Beispiel:SELFHTML-Beispiel-Grundlayout.css" />
  <style>
svg { 
  background: white;
  border: 1px dotted #3983ab;
  width: 96%;
  padding: 0;
  height: 450px;
  }
 
text {
  font-size: 90px;
  font-weight:bold;
  font-weight:900;
  fill: blue;
}
  </style>
  <title>SVG - Text mit Filter feTurbulence</title>
</head>
 
<body>
  <h1>SVG - Text mit Filter feTurbulence</h1>
 
<main>

<svg width="350" height="75" viewBox="0 0 350 75">
  <title>Wolke</title>
    <defs>
       <filter id="wolke">
            <feTurbulence type="turbulence" baseFrequency="0.055" numOctaves="5"/>
            <feColorMatrix type="luminanceToAlpha"/>
            <feColorMatrix type="matrix" values="0 0 0 -1 1    0 0 0 -1 1    0 0 0 -1 1   0 0 0 0 1"/>
            <feComponentTransfer>
                <feFuncR type="table" tableValues="0   0    0   .4  1"/>
                <feFuncG type="table" tableValues="0   .15  .5  .9  1"/>
                <feFuncB type="table" tableValues="0   0    1   1  1"/>
                <feFuncA type="linear" slope="1" intercept="0"/>
            </feComponentTransfer>
        </filter>

      <mask id="textMask">
         <text style="fill:white;" x="10" y="60">
         Wolke
         </text>
      </mask>
    </defs>

    <text x="10" y="60" filter="url(#wolke)" mask="url(#textMask)">
    Wolke
    </text>
  </svg>
 
</main>
 
</body>
</html>