Some differences between Ie11 browser and Chrome browser for bgsound and background

Source: Internet
Author: User

Today, when writing a very simple webpage, according to the book, a JPG image is used as a background image, with the background attribute placed in the <body> tag, and the <bgsound> tag is used to insert the background music. The code is as follows:

1 <HTML>2 <Head>3     <title>QQ Space Opening Music</title>4 </Head>5 <Bodybackground= "123.jpg">6     <Bgsoundsrc= "1.mp3"Loop= "true">7     <Center>8             <Embedsrc= "4.swf"></Embed>9     </Center>Ten  One </Body> A </HTML>

Then put it in the browser to check. But I found in the IE11 browser, the background music can play, but the background picture cannot display, but in Chrome, the background picture can display, but does not have the background music. Next I search, found that Google Chrome does not support <BGSOUND>, the solution is to swap <embed> tags. The following <embed src= "1.mp3" autostart= "true" loop= "true" hidden= "true" >. But Chrome's support for this tag is not good enough to recognize the circular play instructions. But this also makes good, otherwise if really want to implement also need to use HTML5 's <audio> tag. Since Internet Explorer is limited by the version of the system, not all users are upgraded to win8.1 or WIN10, so their browsers may not be able to support HTML5 well.

The next problem is that IE does not show my background image problem. Search for a long time also no results, and then I would like to try is not "can not use relative path, can only use absolute path" reason. So I open that JPG image in IE browser. Suddenly I understand that JPG images can not be read in the IE11, in IE11 it is a can't read things. So I changed the image in the source code to expand the name is a PNG image, and then a try to succeed.

The above shows that:

1, Google Chrome does not support bgsound tags, but supports JPG format picture display

2, IE11 Browser does not support the JPG format picture display, but supports the bgsound tag.

In view of many users in the domestic use of IE browser, so be careful to follow the format of IE browser to write Web pages.

Some differences between Ie11 browser and Chrome browser for bgsound and background

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.