可以为 safari 和 firefox 使用 css3 的东西,但不会有它的一部分。我正在输出一个购物类别和子类别的列表,每个列表都有一个单独的列表。
这就是我所拥有的(到目前为止还没有工作)。任何帮助都会受到欢迎。
<div style="float:left; width: 232px;">
<?
$rowcount = 1;
$strSql = "SELECT * FROM Category ORDER BY CategoryName ASC";
$r = $db->select($strSql);
while ($row=$db->get_row($r, 'MYSQL_ASSOC')) {
$CategoryID = $row['CategoryID'];
$CategoryName = $row['CategoryName'];
?>
<div style="width: 232px; background-color:#f2f2f2; padding: 5px; margin-top: 5px; -webkit-border-radius: 4px; border-radius: 4px; overflow:hidden; padding-left: 5px;">
<h1><a href="/<?=$colour?>/<?=$CategoryURL?>/" ><?=$CategoryName?></a></h1>
<ul>
<?
$strSql2 = "SELECT
SubCategory.SubCategoryID,
SubCategory.SubCategoryName,
SubCategory.SubCategoryURL,
SubCategory.CategoryID
FROM
SubCategory
WHERE
CategoryID = $CategoryID
ORDER BY
SubCategoryName";
// echo "<pre>$strSql</pre>";
$r2 = $db->select($strSql2);
while ($row2=$db->get_row($r2, 'MYSQL_ASSOC')) {
$SubCategoryID = $row2['SubCategoryID'];
$SubCategoryName = $row2['SubCategoryName'];
$SubCategoryURL = $row2['SubCategoryURL'];
?>
<li><a href="/<?=$colour?>/<?=$CategoryURL?>/<?=$SubCategoryURL?>/"><?=$SubCategoryName?> (<?=$rowcount?>)</a></li>
<?
$rowcount++;
if ($rowcount == 35) { echo"</ul></div><div style=\"float:left; width: 232px;\"><ul>"; $rowcount = 0;}
} // end get SubCategory
?>
<? if ($rowcount == 0) { echo""; } else {echo"</ul>";} ?>
</div>
<? } // end get category list
?>
</ul> <!-- END CATEGORY UL -->
</div>
</div>