Transparency applications: Initializing the effects of a page
When making a Web page, add some initialization effects as appropriate.
Will give a good first impression.
This time, I'll talk to you about one of the uses of filter => Opacity
Opacity is transparency. 100 is opaque, and 0 is fully transparent. The General JS syntax is:
Object.filters.item (0). Opacity
The following examples illustrate his general usage.
<title>Example</title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<style type= "Text/css" >
<!--
Body {background-color: #0066CC; Filter:alpha (opacity=0); Background-image:url (Http://www.oso.com.cn/image/logo.gif)}
-->
</style>
<script>
Function ol ()
{
if ((Document.body.filters.item (0). opacity+=10) <100)
SetTimeout ("Ol ();", 1);
}
</script>
<body bgcolor= "#FFFFFF" text= "#000000" >
</body>In fact, opacity can be used in any of the visible elements of the Web page, such as pictures, layers, fonts, and so on.
Above only for personal opinion, have better please contact me
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