Cool text wave animation effects based on HTML5 SVG,

Source: Internet
Author: User

Cool text wave animation effects based on HTML5 SVG,

This is a cool text Wave Effect Based on HTML5 SVG. This text wave animation effect uses the SVG mask and CSS hybrid mode in the text to make the effect of the wave movement, just like there is a sea in the text, the effect is very cool.

Method of use: HTML Structure

Download Online Preview source code

In SVG, use<pattern>Elements are used as the pattern of wave movement.<text>The element is text, in the groupg#effUse four rectangles as the text mask layer, and set their CSS mixed modecolor-burn.

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"   width="450px" height="240px" xml:space="preserve">  <defs>    <pattern id="water" width=".25" height="1.1" patternContentUnits="objectBoundingBox">      <path fill="#000" d="M0.25,1H0c0,0,0-0.659,0-0.916c0.083-0.303,0.158,0.334,0.25,0C0.25,0.327,0.25,1,0.25,1z"/>    </pattern>        <text id="text" transform="translate(2,116)" font-family="'Cabin Condensed'" font-size="161.047">OCEAN</text>        <mask id="text-mask">      <use x="0" y="0" xlink:href="#text" opacity="1" fill="#ffffff"/>    </mask>        <g id="eff">      <use x="0" y="0" xlink:href="#text" fill="#a2a3a5"/>    <rect class="water-fill" mask="url(#text-mask)" fill="url(#water)" x="-300" y="50" width="1200" height="120" opacity="0.3">    <animate attributeType="xml" attributeName="x" from="-300" to="0" repeatCount="indefinite" dur="2s"/>  </rect>   <rect class="water-fill" mask="url(#text-mask)" fill="url(#water)" y="45" width="1600" height="120" opacity="0.3">    <animate attributeType="xml" attributeName="x" from="-400" to="0" repeatCount="indefinite" dur="3s"/>  </rect>        <rect class="water-fill" mask="url(#text-mask)" fill="url(#water)" y="55" width="800" height="120" opacity="0.3">    <animate attributeType="xml" attributeName="x" from="-200" to="0" repeatCount="indefinite" dur="1.4s"/>  </rect>      <rect class="water-fill" mask="url(#text-mask)" fill="url(#water)" y="55" width="2000" height="120" opacity="0.3">    <animate attributeType="xml" attributeName="x" from="-500" to="0" repeatCount="indefinite" dur="2.8s"/>  </rect>    </g>  </defs>     <use xlink:href="#eff" opacity="0.9" style="mix-blend-mode:color-burn"/></svg>                
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.