【发布时间】:2018-05-08 15:32:48
【问题描述】:
$need_it_sooner = l(
t('Need it sooner? Click here'),
'need-it-sooner', array(
'attributes' => array(
'class' => array('float-right', 'button', 'button-red'),
'style' => 'float:right;',
))
);
这是我的代码,我希望它显示出来
需要吗?点击这里。
我能否在 t() 中轻松地设置文本样式,还是必须编写另一个大块来完成此操作?
【问题讨论】:
-
可能将
font-weight: bold;添加到'style'属性中? -
你能把
l和t的源代码贴出来吗?! -
你在使用 Drupal 吗?
-
我认为你应该在你的问题中指出这一点。
l和t是 Drupal 函数,而不仅仅是 PHP 函数。