Heim >Backend-Entwicklung >PHP-Tutorial > PHP变量中加CSS代码。解决方法
PHP变量中加CSS代码。
<br /> #scrolling_1 { width:635px; height:240px; overflow:hidden; padding:1px; border:1px solid #999; margin:0 auto; text-align: left; }<br /> #scrollnews_1 { position:absolute; width:645px; height:240px; overflow:hidden; display:inline; top:1; left:1; }<br /> #scrollnews_con_1 { width:645px; overflow:hidden; }<br /> #scrolling_1 ul { display:block; height:240px; width:645px; }<br /> #scrolling_1 ul li { height: 240px; width: 205px; float: left; overflow:hidden; display: inline; margin-right: 10px; }<br /> 这个我想给PHP变量付值后输出。<br /> <?<br /> for (i=0 ;i=100; i++) {<br /> echo "#scrolling_1 { width:635px; height:240px; overflow:hidden; padding:1px; border:1px solid #999; margin:0 auto; text-align: left; }";<br /> #scrollnews_1 { position:absolute; width:645px; height:240px; overflow:hidden; display:inline; top:1; left:1; }<br /> #scrollnews_con_1 { width:645px; overflow:hidden; }<br /> #scrolling_1 ul { display:block; height:240px; width:645px; }<br /> #scrolling_1 ul li { height: 240px; width: 205px; float: left; overflow:hidden; display: inline; margin-right: 10px; }<br /> <br /> }<br /> ?><br /> 这么写了以后,不正常了。<br /> 我该怎么写呢?<br /> <br />