web-dev-qa-db-fra.com

Comment obtenir une hauteur = 100% sur <objet> Embed

J'essaie d'insérer le code suivant mais cela ne fonctionne pas. Je ne suis pas en mesure d'obtenir 100% de hauteur avec cela. Quelqu'un peut-il m'aider? Merci!

<body style="overflow:hidden;">
<TABLE align=left width=234 border="0" cellpadding="0" cellspacing="0">
<TR>
    <TD valign=top align=center WIDTH="234" >
        <object data="EmbedPage.html" type="text/html"  style="width: 230px;height:100%;"></object>
    </TD>
</TR>
</TABLE>
</body>
12
user2261793

essaye ça

<body style="overflow:hidden;height:100%;">
    <object data="EmbedPage.html" type="text/html"  style="float:left;width:230px;height:100%;">
    </object>
</body>
5
Rohit Agrawal

Pour l'afficher en plein écran, utilisez: 100vh;

<body>
   <object data="EmbedPage.html" type="text/html"  style="width:100%;height:100vh;">
   </object>
</body>
4
tak3shi

Retirez-le simplement de la table.

<BODY style="overflow:hidden; height:100%;">

<object data="http://www.misgeret.co.il/Ebay/Famus/SideMenuFamus.html" type="text/html"  style="float:left;width:230px;height:100%"></object>

</BODY>

http://jsfiddle.net/ma9ic/QtKMa/5/

100% de hauteur dans une cellule d'un tableau est toujours pénible. Techniquement parlant, un TD n'a pas de hauteur (car cela dépend de son contenu). Ce que vous demandez au navigateur est de faire de l'enfant 100% de son parent, qui est 100% de son enfant , qui représente 100% de son parent ... Vous pouvez voir en quoi cela pourrait être un problème.

Vous pouvez essayer d'ajouter une hauteur explicite au TD et en utilisant la disposition de table: fixée sur la table. Au moins de cette façon, le navigateur connaît la hauteur du parent sans avoir besoin de la taille de l'enfant mais cela peut toujours ne pas fonctionner.

Vous devrez peut-être repenser votre façon de procéder.

Cela vous montre le résultat en utilisant une hauteur définie et en utilisant des iframes

<BODY style="overflow:hidden;height:100%;">

<TABLE align=left width=234 border="1" cellpadding="0" cellspacing="0">
<TR>
    <TD valign=top align=center WIDTH="234" height="1000">
    <iframe src="http://www.misgeret.co.il/Ebay/Famus/SideMenuFamus.html" style="border:0px #FFFFFF none;" name="myiFrame" scrolling="no" frameborder="0" marginheight="0px" marginwidth="0px" height="100%" width="100%"></iframe>
    </TD>
</TR>
</TABLE>

</BODY>

http://jsfiddle.net/ma9ic/QtKMa/6/

J'espère que cela t'aides

2
Ma9ic
body, html{
    width: 100%;
    height: 100%;
}

<body>
    <table class="flash-container" style="height: 100%; width:100%">
        <tr style="height: 100%; width:100%">
            <td style="height: 100%; width:100%">
                <object width="100%" height="100%">
                    <param name="autoPlay" value="true"></param>
                    <embed allowfullscreen="true" autoPlay="true" flashvars="autoplay=true&play=ture" allownetworking="all" id="pptShow" allowscriptaccess="always" height="100%" src="http://www.weilaijiaoxue.com:9096/upload/2016/4/13/swf_20160413115509559.swf"  type="application/x-shockwave-flash" width="100%"></embed>
                </object>
            </td>
        </tr>
    </table>
</body>
1
Wei Feng Sun