Use JavaScript to rotate page pictures

Source: Internet
Author: User
Tags filter modify
javascript| Page | rotate

Rotation filter can make the picture rotate effect, note must be IE5.5 and IE6.0 to see!

<meta http-equiv= "Content-type" content= "text/html; charset=gb2312"
<style>
Body img{border:3 Gold Ridge}
</style>
//the CS code to add a border to the picture
<title> use JavaScript to rotate a Web page picture </title>
<script language= "JavaScript" >
Var i=0;
Function playimg ()
{
image.style.filter= "progid:DXImageTransform.Microsoft.BasicImage (rotation=" +i+ ") ";
i++; 
if (i>4)
{i=1};
Mytimeout=settimeout ("playimg ()", 1500);
}
</script>
//above is the code that transforms the picture in four directions
<body bgcolor= "#FFFFFF" text= "#000000"
//Modify the body to display the effect for loading
< /body>
</body>

<ptml><pead><meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "><style>body img{border:3 gold ridge}</style> <title> use JavaScript to rotate the image of a Web page </title><script language= "javascript" >var i=0; function playimg () {image.style.filter= "Progid:DXImageTransform.Microsoft.BasicImage (rotation=" +i+ ")"; I++;if (i  >4) {I=1};  Mytimeout=settimeout ("playimg ()", 1500); }</script></pead> <body bgcolor= "#FFFFFF" text= "#000000" ></body></body></ptml>

[Ctrl + A ALL SELECT hint: You can modify some of the code, and then run]



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.