我試圖找到一種方法來使我的td或表多種顏色。html/php中的多色TD?
echo "<table padding=\"0\" spacing=\"0\"
style=\"background-color:yellow; width: 100%; margin-left: 2px;
width: 100%; line-height: 80% ;\">";
echo "<tr>";
echo "<td class=\"bgfiller\">
<font style=\"color: black; font-size:90%; \" >
".$rowbis['Lnaam']." - ".$rowbis['Type_name']."</font>
</td></tr>";
我bgfiller風格看起來是這樣的:
.bgfiller{
width: 10px;
background-color: red;
z-index: 1 ;
}
所以我想要做的是使一個塊是黃色的小方塊在它10px的的(將被設置在稍後的狀態中變量)並且在其上覆蓋一些文本。
所以你會得到一個像文本的進度條。但是文本必須使用表格的完整寬度並且只使用10px。
任何人都知道如何讓這個工作?
我極力推薦使用像jQuery,Dojo,Prototype,MooTools等Javascript庫,它們都包含諸如開箱即用的東西。 – 2011-04-13 20:37:15
這樣的事情? http://jsfiddle.net/3mGfC/ – stealthyninja 2011-04-13 20:42:07
@ daemonfire300當基本的CSS可以做時,真的不需要JavaScript。 JavaScript程序庫非常適合JavaScript編程。不適用於基本的頁面佈局和程式。 – VoteyDisciple 2011-04-13 20:51:22