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