自定义css样式,CakePHP: 如何在$html->link中使用自定义样式

在CakePHP的HtmlHelper的作用是使HTML相关的选项更容易,更快,更灵活。

如果你想用HtmlHelper实现自定义样式,如下效果:
<a class="active" href="/credits">Credits</a>
可以使用如下语句:
<?php echo $this->Html->link(__('Credits', true), array('plugin' => null, 'controller' => 'credits', 'action' => 'index'), array('class'=>'active')); ?>
Tags:  自定义ccs样式 自定义样式 自定义css样式

延伸阅读

最新评论

发表评论