【发布时间】:2013-10-17 19:15:02
【问题描述】:
我有这个代码:
$this->Html->image('img/button/shop.png',
array('url'=>array('controller' => 'shops', 'action'=> 'index'), 'width'=>'200px', 'class'=>'contshop'));
css:
.contshop:hover{ 背景图片: url('img/button/shop2.png'); }
我希望图像(shop.png)更改为其他图像(shop2.png)。但是代码不起作用。任何人都可以帮助我吗?谢谢
【问题讨论】:
-
而不是抛出
$this->分享生成的html和css -
嗨,上面提到了 css (.contshop)。结果显示图像(shop.png),但是当鼠标悬停在图像上时没有任何反应。
-
恕我直言,悬停确实会更改您的
image元素的背景,但由于图像shop.png本身,您看不到它。 -
意思是shop.png隐藏背景?在 cakephp 中更改图像(悬停)的任何想法?
标签: html css image cakephp hover