zx5629821 发表于 2015-10-22 10:01:16

根据不同页面判断不同css的代码怎么写?

{if 如果是首页}
<link rel="stylesheet" href="n.css" />
{else if 如果是影视首页}
<link rel="stylesheet" href="n.css" />
{else if 如果是影视列表页}
<link rel="stylesheet" href="n.css" />
{else if 如果是影视内容页}
<link rel="stylesheet" href="n.css" />
{else if 如果是影视播放页}
<link rel="stylesheet" href="n.css" />

.....这中间还有电影 或者动漫的页面
{else}
css样式
{/if}
想要的效果大概是上面这样子的。

空气中的鱼儿 发表于 2015-10-22 10:08:36

<php>
if($model=="index" && $action =="index"){

echo "首页";

}
elseif($model=="vod" && $action =="show"){
echo "栏目页面";
}
elseif($model=="vod" && $action =="read"){
echo "内容页面";

}
elseif($model=="vod" && $action =="play"){
echo "播放页面";

}
else{

echo "其他";

}
</php>
页: [1]
查看完整版本: 根据不同页面判断不同css的代码怎么写?