_javascript techniques for the effect of progress strips achieved with CSS+JS
Source: Internet
Author: User
Progress bar, is in the user enters your website, can let the user see the webpage downloading how many, this function is very obvious---is lets the user wait for the time to become longer, may effectively make up the space slow shortcoming (of course, your space is too slow, or suggest you change space, hehe)
Okay, now let me give you two examples.
One is implemented in Flash (this web site is a lot of sites are, do not say)
One is implemented with a dynamic GIF (this you can see the Microsoft Official download page, do not say)
Here, our focus is to use CSS+JS to achieve this effect
Well, nonsense don't say much, we start
First, write a paragraph of HTML code
<div id= "Loading" >
<strong id= "Loadcss" > 33%</strong>
</div>
Okay, now we're going to write the CSS code.
#loading {
width:300px;
Background-color: #000;
border:2px solid #000;
}
This is the background that we want the progress bar to be #000, black, and a border.
J
Next many loadcss to design
#loadcss {
Display:block; /* It's important to make a block * *
Background-color: # 0DF;
Text-align:center;
}
Note that the block is very important here, we use #0df this color as the color of the progress bar;
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