首页 / CSS / PHP变量中加CSS代码。
PHP变量中加CSS代码。
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了PHP变量中加CSS代码。,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2074字,纯文字阅读大概需要3分钟。
内容图文
#scrolling_1 { width:635px; height:240px; overflow:hidden; padding:1px; border:1px solid #999; margin:0 auto; text-align: left; }#scrollnews_1 { position:absolute; width:645px; height:240px; overflow:hidden; display:inline; top:1; left:1; }#scrollnews_con_1 { width:645px; overflow:hidden; }#scrolling_1 ul { display:block; height:240px; width:645px; }#scrolling_1 ul li { height: 240px; width: 205px; float: left; overflow:hidden; display: inline; margin-right: 10px; }这个我想给PHP变量付值后输出。这么写了以后,不正常了。我该怎么写呢?
回复讨论(解决方案)
for (i=0 ;i=100; i++) {
循环写错了吧
变量前面要加$
即
for ($i=0 ;$i=100; $i++) {
呵呵,
上面的代码写错了。
我从新写了。
#scrolling_1 { width:635px; height:240px; overflow:hidden; padding:1px; border:1px solid #999; margin:0 auto; text-align: left; }#scrollnews_1 { position:absolute; width:645px; height:240px; overflow:hidden; display:inline; top:1; left:1; }#scrollnews_con_1 { width:645px; overflow:hidden; }#scrolling_1 ul { display:block; height:240px; width:645px; }#scrolling_1 ul li { height: 240px; width: 205px; float: left; overflow:hidden; display: inline; margin-right: 10px; }这个我想给PHP变量付值后输出。这么写了以后,不正常了。我该怎么写呢?
echo "****引号位置错了吧?? $i没用到 输出100个同样的样式?
呵呵,
上面的代码写错了。
我从新写了。
#scrolling_1 { width:635px; height:240px; overflow:hidden; padding:1px; border:1px solid #999; margin:0 auto; text-align: left; }#scrollnews_1 { position:absolute; width:645px; height:240px; overflow:hidden; display:inline; top:1; left:1; }#scrollnews_con_1 { width:645px; overflow:hidden; }#scrolling_1 ul { display:block; height:240px; width:645px; }#scrolling_1 ul li { height: 240px; width: 205px; float: left; overflow:hidden; display: inline; margin-right: 10px; }这个我想给PHP变量付值后输出。这么写了以后,不正常了。我该怎么写呢?
你下面那些直接写在里面?
不用双引号
ID只能使用一次,你循环到第二次的时候,怎么可能再使用呢?
你的循环没什么用啊
重复输出统一的样式表 ? 不知道你要干什么,先把问题理清楚吧。
内容总结
以上是互联网集市为您收集整理的PHP变量中加CSS代码。全部内容,希望文章能够帮你解决PHP变量中加CSS代码。所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。