HTML 5 progress compatible with ie, progress bar style, html5progress

Source: Internet
Author: User

HTML 5 progress compatible with ie, progress bar style, html5progress

The html5 SS tag added by html5 is very useful. It can be used to create progress bars instead of making progress bars using css as before!

 

I. Usage of progress

The SS tag is very useful. It has two attributes: value and max. value indicates the current progress, while max indicates the total progress (100 is generally used)

1 <progress value="50" max="100"></progress>

 

Ii. How can progress be compatible with IE browsers?

If you have used the progress tag, you must know that it is easy to use but not compatible with IE. So today, let's talk about it if it is compatible with IE! We first add the progress and ie labels with js, because they are not recognized in ie browser, and then we can make css a progress bar! Take a look at the code!

Html code

123 <progress id="progress" value="1" max="100">    <ie id="ie"></ie></progress>

Css code

12345678910111213 progress::-webkit-progress-bar { background#ccc; }progress::-webkit-progress-value  { backgroundblue; }progress {    display:block;    width:162px;    background:#ccc;}ie {    height:100%;    width:0%;    display:block;    background:blue;}

 

Js Code

12 document.createElement('progress');document.createElement('ie');

 

In this way, the progress tag can be compatible with all browsers. There are also page loading progress bar instances compatible with all browsers. If you are interested, please take a look!

Do you want to get updates from Wang yelou's personal blog every day? Add the Public Account"Ly89cn", Or scan the QR code below!

 

This article from Wang yelou's personal blog, this article address: http://www.ly89.cn/detailB/63.html

You are welcome to share this article. For more information, see the source and address of this article.

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.