Home  >  Article  >  Web Front-end  >  How to add flash to css

How to add flash to css

藏色散人
藏色散人Original
2021-01-04 10:42:421826browse

How to add flash to css: First create a JS file flash.js; then call the file on the page; finally write the flash style in CSS.

How to add flash to css

The operating environment of this article: Dell G3 computer, Windows 7 system, HTML5&&CSS3 version.

Recommended: "css video tutorial"

Specific questions:

##css Add flash

There is a FLASH at the top of our company's web pages. The FLASH code is written in each level of the web page, and the position and size are the same. I want to write it as CSS, so that the code is relatively simple. How should I do it? Ah?

Implementation method:

You can call FLASH externally

First create a JS file flash.js. Write the following code:

function swf(file,w,h) {
document.write(&#39;<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="&#39;+w+&#39;" height="&#39;+h+&#39;"> &#39;);
document.write(&#39;<param name="movie" value="&#39; + file + &#39;">&#39;);
document.write(&#39;<param name="quality" value="high"> &#39;);
document.write(&#39;<param name="wmode" value="transparent"> &#39;);
document.write(&#39;<param name="menu" value="false"> &#39;);
document.write(&#39;<embed src="&#39; + file + &#39;" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="&#39;+w+&#39;" height="&#39;+h+&#39;"></embed> &#39;);
document.write(&#39;</object> &#39;);
}

and then call it on the page:

<script type="text/javascript" language="javascript" src="flash.js"></script>
<div id="flash">
<script type="text/javascript" language="javascript">swf(designyesky.swf);</script>
</div>

The flash style can be written in CSS.

The above is the detailed content of How to add flash to css. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn