长html表失去了它的背景图像

时间:2012-12-15 10:41:56

标签: html css css-tables

表格单元格中有大约7500(短)文本行 该表在大约第1800行丢失了它的背景图像 桌子的长度是否有限制?
单元格中的文本保持可见直到结束,但没有背景 表名为#story。

#story{
    margin-top:15px;
    border:medium ridge #FFF;
    border-radius:9px;
    background-image:url(img/back01.jpg);
    }

也尝试过:

    background: url("img/back01.jpg") repeat; // without result
    background-color:#FFF; // this works along the whole table.
}

2 个答案:

答案 0 :(得分:2)

我没有看到你的问题:

<强> HTML:

<table id="story"><tr><td id="content"></td></tr></table>

<强> JS:

for(var i=1; i < 3000; i++) {
    var line = document.createElement("div");
    line.innerHTML = "line " + i;
    document.getElementById("content").appendChild(line);
 }

<强>的CSS:

#story{
    margin-top:15px;
    border:medium ridge #FFF;
    border-radius:9px;
    background-image:url(http://www.google.co.uk/images/srpr/logo3w.png);
    }​

我有那个工作here

答案 1 :(得分:1)

我测试了与palako相同的代码并且对我来说也很好

<!doctype html>
<html>
    <head>
        <style type="text/css"> 
        #story{
    margin-top:15px;
    border:medium ridge #FFF;
    border-radius:9px;
    background-image:url(back01.jpg);
    }
        </style>
    </head>
    <body>
        <table id="story"> 
         <?php 
         $z="";
         echo "<tr><td>";
         for($i=0; $i<8000; $i++)
         {
         $z = $z.$i."\n</br>";
         }
        echo $z."</td></tr>";            
         ?>
        </table>
    </body> 
</html>