开发者

HTML5 Flash 100% IE8 and Firefox

开发者 https://www.devze.com 2023-02-04 11:04 出处:网络
I need to have a flash intro for my website (a requirement from my teacher). I created the intro and embedded it into my page. I takes up the entire screen in both Chrome and Chromium. In IE8, Firefox

I need to have a flash intro for my website (a requirement from my teacher). I created the intro and embedded it into my page. I takes up the entire screen in both Chrome and Chromium. In IE8, Firefox and Opera the size is incorrect. What am I 开发者_JS百科doing wrong?

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Refresh" content="3; url=template.htm">
        <meta charset="UTF-8">
        <title>Com Tech Projects | Jason Cook</title>
    </head>
    <body style="background: black;">
        <embed style="height: 100%; width: 100%;" src="Flash/Introv6.swf"/>
    </body>
</html>


Try to use

<style>
html,body{height:100%;padding:0px;margin:0px;background-color:black;}
</style>

instead.


In the HTML5 doctype, the parent element must also have % values defined for a child element to use % values. So in the CSS for your body tag:

body {
   height: 100%;
   width: 100%;
}

Then it should work.


If you want it fullscreen, write the following:

<video style="position: absolute; height: 100%; width: 100%;">
   <embed style="position: absolute; height: 100%; width: 100%;"  src="Flash/Introv6.swf"/>
</video>

If that does not work, consider the use of the <object> tag instead of <embed>.

0

精彩评论

暂无评论...
验证码 换一张
取 消