Html 如何将嵌入标记的大小强制为div标记的大小?

Html 如何将嵌入标记的大小强制为div标记的大小?,html,css,Html,Css,我如何将嵌入标签的大小强制为div标签的大小,我可以将嵌入标签的大小更改为与div标签相同,但我希望获得嵌入标签的完全重新设置(嵌入标签用于网络摄像头) 试试看这里: 还可以查看allowfullscreen=“false”-->allowfullscreen=“true”选项 希望这有帮助。您可以使用此技巧包装嵌入到div中并定义css规则 <head> <style> .flash-container { height:

我如何将嵌入标签的大小强制为div标签的大小,我可以将嵌入标签的大小更改为与div标签相同,但我希望获得嵌入标签的完全重新设置(嵌入标签用于网络摄像头)


试试看这里:

还可以查看allowfullscreen=“false”-->allowfullscreen=“true”选项


希望这有帮助。

您可以使用此技巧包装嵌入到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&amp;shutter_url=../Scripts/shutter.mp3&amp;width=800&amp;height=600&amp;server_width=800&amp;server_height=600" height="600" width="800" align="middle">  

    </div>
    </body>

.闪存容器{
身高:0;
溢出:隐藏;
垫底:56.25%;
填充顶部:30px;
位置:相对位置;
}
.闪存容器嵌入{
身高:100%;
左:0;
位置:绝对位置;
排名:0;
宽度:100%;
}

是否只应用相同的样式?
    <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&amp;shutter_url=../Scripts/shutter.mp3&amp;width=800&amp;height=600&amp;server_width=800&amp;server_height=600" height="600" width="800" align="middle">  

    </div>
    </body>