【发布时间】:2014-08-10 04:38:14
【问题描述】:
我有 CakePHP 2.5.2。如何在此处修改 cake.generic.CSS 以将默认按钮更改为动作类表中 16x16px 的图像图标:
<td class="actions">
<?php echo $this->Html->link(__('Payment'), array(
'action' => 'add'); ?>
</td>
如果不修改 CSS,我将无法做到这一点。我一直在谷歌上搜索,没有比这更好的了:
cake.generic.CSS
#button123 {
background-image: url('../img/image.png');
display: block;
margin: 0 auto;
text-indent: -9999px;
width: 16px;
height: 16px;
}
/查看/协议/index.php:
<?php echo $this->Html->link(__('Task'), array(
'controller' => 'tasks',
'action' => 'add',
array( 'id' => 'button123')
); ?>
有什么想法吗?
【问题讨论】: