JavaScript Pictures Small Effects 5 cases

Source: Internet
Author: User
javascript| Special Effects

Note: the picture's filename and path can be modified by itself.

Second, circulation fade effect

1, the following code into the <body> area:

alt= "Image" style= "Filter:alpha (opacity=0)" >
<script language= "JavaScript" >
var b = 1;
var C = true;
function Fade () {
if (document.all);
if (c = = True) {
b++;
}
if (b==100) {
b--;
c = False
}
if (b==10) {
b++;
c = true;
}
if (c = = False) {
b--;
}
U.filters.alpha.opacity=0 + b;
SetTimeout ("Fade ()", 50);
}
</script>

2. Change the <body> area to:

<body bgcolor= "#ffffff" >

Note: the picture's filename and path can be modified by itself.

Third, prohibit picture downloading

Set a picture prohibit downloading, the mouse moved to the picture above will give a hint, this method can only deal with rookie.

The method is as follows:

<a href= "javascript:void (0)" ></A>

Note: the picture's filename and path can be modified by itself.

Four, the realization of picture looming effect

The picture that you add to the page in this way will be blurry at the beginning, and the picture will appear clearly when you move the mouse over the picture.

1, the following code into the <body> area:

<script language= "JavaScript" >
<!--
function Makevisible (Cur,which) {
if (which==0)
cur.filters.alpha.opacity=100
Else
Cur.filters.alpha.opacity=20
}
-->
</SCRIPT>

2, the following code into the <body> area:

Note: the picture's filename and path can be modified by itself.

V. Picture size transform

The first picture is a zoom out, the mouse moves to the top of the picture, the picture will enlarge to the actual size of the display.

Add the following code to the <body> area:

<span id= "S1" style = "width:100" >
<a href= "index.shtml"

>

</a>
</span>



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.