【发布时间】:2016-02-23 10:27:00
【问题描述】:
谁能帮我将下面的html代码添加到php循环中
目的是用 3 种不同的颜色将段落重复 101 次
谢谢
HTML
p:nth-child(1n) {background: #e0ffff:}
p:nth-child(2n) {background: #f5f5db};
p:nth-child (3n) {background: #ffe4e1;}
PHP
<?php
for ($n=0; $n<101; $n++)
echo "Paragraph $n..."."<br />
\n";
?>
【问题讨论】: