久久久久av_欧美日韩一区二区在线_国产精品三区四区_日韩中字在线
Discuz! 官方交流社區(qū)
標(biāo)題:
cobob:用if代碼 在不同板塊調(diào)用不同的CSS定義(轉(zhuǎn)存)
[打印本頁]
作者:
myes
時(shí)間:
2023-10-5 13:00
標(biāo)題:
cobob:用if代碼 在不同板塊調(diào)用不同的CSS定義(轉(zhuǎn)存)
看到官方的模板里有這樣的代碼:
<a href="home.php?mod=spacecp&ac=credit&showcredit=1" id="extcreditmenu"{if !$_G[setting][bbclosed]} onmouseover="delayShow(this, showCreditmenu);" class="showmenu"{/if}>
復(fù)制代碼
那如果想要實(shí)現(xiàn)如下的功能 是不是也可以呢:
<div class="
{如果 板塊ID=1}1
{或如果 板塊ID=2}2
{或如果 板塊ID=3}3
{或如果 板塊ID=4}4
{或如果 板塊ID=5}5
{或如果 板塊ID=6}6
"
{if}
>熱烈祝賀witframe發(fā)布!</div>
感謝
eqmz
提供解決方法:
列表頁:forumdisplay.htm
{$_G[fid]}
翻譯如下:
<div class="
{if $_G[fid]==1}1
{elseif $_G[fid]==2}2
{elseif $_G[fid]==3}3
{elseif $_G[fid]==4}4
{elseif $_G[fid]==5}5
{elseif $_G[fid]==6}6
"
{/if}
>熱烈祝賀witframe發(fā)布!</div>
列表頁樣式css定義完成,不知道這樣是否合你的要求。
歡迎光臨 Discuz! 官方交流社區(qū) (http://www.9999xn.com/)
Powered by Discuz! W1.0