JS to achieve cool water wave text special effects examples _javascript skills

Source: Internet
Author: User

This article describes the JS implementation of cool water wave text effects. Share to everyone for your reference. The implementation methods are as follows:

Copy Code code as follows:
<title>js to achieve cool wave text effects </title>
<body bgcolor= "#000000" onload= "if (document.all) wave ()" >
<center>
<div id= ' water ' style= ' position:relative;width:400px;height:150px;font-family:verdana;font-size:50px;color:# 8080FF ' >
</div>
</center>
<script language= "JavaScript" >
<!--
if (document.layers) {//if the NS
Alert ("Your browser does not support this special effect"); Make a hint
}
else//otherwise (not NS)
if (document.all) {//and is IE words
var step=3; Set the step to change the effect
var xstep=0;
var msg= ' Welcome to <br> cloud-dwelling community <br>jb51.cn ';
WATER.INNERHTML=MSG//Set effect layer content
Function Wave () {
This is used to set the style of the layer in which the phase property of the filter is dynamically set according to the Xstep value.
Document.all.water.style.filter= ' Wave (freq=3, strength=5, phase= ' +xstep+ ', lightstrength=45, Add=0, enabled=1) ';
Xstep+=step;
Change the Xstep value based on the step value so that the ripple angle changes slightly the next time the layer style is refreshed
Timer=settimeout (' Wave () ', 10);/Set the time delay for the next change
}
}
-->
</script>

I hope this article will help you with your JavaScript programming.

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.