如何将embed标签的大小强制为div标签的大小,我可以将embed标签的大小更改为与div标签相同但我想获得embed标签的完全重新标记(使用embed标签)对于摄像头)
<div style="background-color: #111; width: 80%; height:500px; margin-left: auto; margin- ight: auto; ">
<embed id="webcam_movie" wmode="Transparent" src="../Scripts/webcam.swf" loop="false" menu="true" quality="best" bgcolor="#ffffff" name="webcam_movie" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="shutter_enabled=1&shutter_url=../Scripts/shutter.mp3&width=800&height=600&server_width=800&server_height=600" height="600" width="800" align="middle">
</div>
答案 0 :(得分:1)
你可以使用这个技巧包嵌入div并定义css规则
<head>
<style>
.flash-container {
height: 0;
overflow: hidden;
padding-bottom: 56.25%;
padding-top: 30px;
position: relative;
}
.flash-container embed {
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
}
</style>
</head>
<body>
<div class="flash-container" style="background-color: #111; width: 80%; height:500px; margin-left: auto; margin-right: auto; ">
<embed id="webcam_movie" wmode="Transparent" src="../Scripts/webcam.swf" loop="false" menu="true" quality="best" bgcolor="#ffffff" name="webcam_movie" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="shutter_enabled=1&shutter_url=../Scripts/shutter.mp3&width=800&height=600&server_width=800&server_height=600" height="600" width="800" align="middle">
</div>
</body>
答案 1 :(得分:0)
试试看:
http://soundscreen.com/qt_webmasters/fullscreen.html
另请参阅 allowfullscreen =&#34; false&#34; - &gt; allowfullscreen =&#34; true&#34; 选项。
希望这有帮助。