Continuous background music Making method the whole process

Source: Internet
Author: User
Keywords Background music

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

Recently made a traditional type of Web site, you need to use the background music. But you know, in the page template all add background music effect, if pop-up new window, will cause repeat playback, if on this page open, will cause music to play again.

How to solve this problem? In fact, I've done this before, using the IF framework. The problem is that the width of the frame is limited, and the height of each page is different. Before the effect is an enterprise station, each page to do as high as can be done. The content uses the CSS to control the automatic scroll bar. But this is a big website, many columns, using the previous solution is not realistic.

The internet is good, after Google, finally find the JS solution. Despise Baidu, the search out of the whole is useless things.

First, create a file under the site root directory index.html Enter the following:

==================================

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
<html xmlns= "http://www.w3.org/1999/xhtml"
<head>
<meta http-equiv= "Content-type" content= "HTML; charset=gb2312 "/>
<title> Jiqiang TAIJI club WEB site</title>
<meta name=keywords Content= Taijiquan, Chen's Taijiquan, flood-style Taijiquan/>
<meta name=description content= The strong Taijiquan Culture Club was founded on August 8, 2008 and was initiated by Mr. Li Zhenwei, the 20th authentic descendant of Chen's Taijiquan, His disciples Li Jiqiang, Lu Zhenhai founded Taijiquan organization. Its predecessor is: "Shandong Dragon Martial arts Museum." The club is headquartered in China's famous martial arts township, calligraphy and painting township, Opera township, Peony town, Shandong province Heze. />
<script type=text/javascript>
<!--
var getffversion=navigator.useragent.substring ( Navigator.userAgent.indexOf ("Firefox")). Split ("/") [1]
//extra height in px to add to IFRAME in Firefox 1.0+ browsers Br>var ffextraheight=getffversion>=0.1? 16:0

function Dyniframesize (down) {
var ptar = null;
if (document.getElementById) {
Ptar = document.getElementById (down);
}
else{
Eval (' Ptar = ' + down + '; ');
}
if (Ptar &&!window.opera) {
Begin resizing IFRAME
ptar.style.display= "Block"

if (ptar.contentdocument && pTar.contentDocument.body.offsetHeight) {
NS6 syntax
Ptar.height = Ptar.contentdocument.body.offsetheight+ffextraheight;
}
else if (ptar.document && pTar.Document.body.scrollHeight) {
ie5+ syntax
Ptar.height = PTar.Document.body.scrollHeight;
}
}

}
-->
</script>
<style type= "Text/css" >
<!--
*{margin:0px;
-->
</style></head>

<body>
<iframe name= "Down" width= "100%" frameborder= "0" src= "index.html" scrolling= "no" id= "Down" onload= "javascript: Dyniframesize (' Down ');
/></iframe>
</body>
</html>

==================================

OK, to this end, the framework of the Web page has been completed. IE6 Firefox Google browser are tested through. The next thing to do is simply to add background music to the page.

Using <bgsound src= "1.mid" loop= "Infinte" > Code Plus, ie tested successfully, Firefox and Google test failed. Halo, look again.

<embed src= "1.wma" hidden= "true" height= "0" width= "0" loop= "true"/>

Ok,ie Firefox Google Browser has been tested successfully. But, but, but, but, incredibly ...

In IE, there is a white line at the bottom of the page. There is no such problem in Firefox and Google. I'm crazy, this dog P's ie ...

How to solve it???

Smoke first ...

Suddenly I think of the horse, we should have been hanging horses, hanging horses are both the width of the 0 if frame, and I have used a framework, it does not care to use more than a frame!

A new song.html file is created in the root directory, and the background music code is added to it. Then add an if to the Index.htm page

<iframe src= "song.html" width= "0" height= "0" ></iframe>

Test success, all browsers support!!

Note: Background music causes the Web page to open slowly, and occupy a large amount of traffic, so it is not recommended to use the Web site.

Second, if is not friendly to search engines, do not use the IF framework if there is no special need.

Third, the use of if framework to do a good job of Web site SEO, keyword introduction or anything can not be less.

Four, if you have a better way, please tell it.

It should be explained that each virtual host can set a different first file. If you are using a virtual host outside the star can be adjusted in the host management panel. The order of adjustment is

Index.htm index.html index.asp.

Virtual hosts that use the new network to interconnect are not adjustable, but by default they are sorted by the order above.

After you set up the sort, the browser automatically accesses your first page, the first one doesn't look for the second, and so on.

Article starting local network studio, reproduced please keep the link! Http://www.difangla.com/Html/jishu/jiqiao/48016910336.html

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.