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.
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:
function swf(file,w,h) { document.write('<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="'+w+'" height="'+h+'"> '); document.write('<param name="movie" value="' + file + '">'); document.write('<param name="quality" value="high"> '); document.write('<param name="wmode" value="transparent"> '); document.write('<param name="menu" value="false"> '); document.write('<embed src="' + file + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed> '); document.write('</object> '); }
<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 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!