21

I'm trying to insert the following code but it is not working. I am not able to get 100% height with this. Can anyone help me? Thanks!

<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>

It looks like you have a permission issue as you're trying to install PIL globally.

To continue with this try (which will also upgrade PIL if you have it installed already):

sudo pip install -U PIL 

If you want to experiment with PIL I recommend looking at using virtualenv. You create a virtual environment which you then activate and can install dependencies into with pip, without using sudo.

For example:

# Change into home directory
cd ~/
# Make 'environments' folder and change into it
mkdir environments && cd $!
# Create virtual environment and change into it
virtualenv test_environment && cd $!
# Activate the environment
source bin/activate
# Install PIL
pip install PIL

This will create a contained environment to use PIL in and avoids using sudo.

Note: you will have to activate the environment every time you want to use any of the requirements though.

4

5 回答 5

22

使用100vh作为height,如果你想将 embed-object 跨越full-screen

<body>
   <object data="EmbedPage.html" type="text/html"  style="width:100%;height:100vh;">
   </object>
</body>
于 2019-03-11T08:23:48.050 回答
6

尝试这个

<body style="overflow:hidden;height:100%;">
    <object data="EmbedPage.html" type="text/html"  style="float:left;width:230px;height:100%;">
    </object>
</body>
于 2013-05-16T10:02:24.040 回答
2

只需将其从表中删除即可。

<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% 高度总是很痛苦。从技术上讲,TD 没有高度(因为这取决于其内容)。你要求浏览器做的是让孩子 100% 的父母,这是 100% 的孩子,这是 100% 的父母......你可以看到这可能是一个问题。

您可以尝试向 TD 添加显式高度并在桌子上使用 table-layout:fixed。至少这样浏览器就知道父母的高度而不需要孩子的高度,但这仍然可能行不通。

您可能需要重新考虑如何处理此问题。

这显示了使用设定高度和使用 iframe 的结果

<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/

希望这可以帮助

于 2013-05-16T12:16:13.813 回答
1
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>
于 2016-06-12T12:12:36.480 回答
0

我使用了以下代码,它在浏览器 style="width:100vw;height:100vh;" 的宽度和高度上完美呈现

于 2021-01-12T11:25:11.777 回答