This article describes the method of JS to achieve the text amplification effect. Share to everyone for your reference. The implementation methods are as follows:
Copy Code code as follows:
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<title>js to achieve text amplification effect </title>
<script type= "Text/javascript" >
var n = 12;
function Chantxt ()
{
var obj = document.getElementById ("test");
if (n <= 42)
{
Obj.style.fontSize = n+ "px";
}
n++;
}
</script>
<body> Mouse over Orange section
<div id= "test" onmouseover= "setinterval" (' Chantxt () ', m) "style=" width:300px; height:50px; font-size:12px; line-height:50px; Background: #f90; " > Cloud-dwelling Community </div>
</body>
The
wants this article to help you with your JavaScript programming.