Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 鼠标悬停时更改Magento目录图像_Css_Image_Magento_Hover - Fatal编程技术网

Css 鼠标悬停时更改Magento目录图像

Css 鼠标悬停时更改Magento目录图像,css,image,magento,hover,Css,Image,Magento,Hover,在目录/分类页面上,我希望图像在悬停时更改。就像我知道如何在html/css上做,但不知道如何在magento上做一样。有什么帮助吗 您可以修改此目录中的文件: app/design/frontend/base/default/template/catalog/product for example (list/ and list.phtml) 或您的模板,例如: app/design/frontend/default/yourtemplate/template/directory with

在目录/分类页面上,我希望图像在悬停时更改。就像我知道如何在html/css上做,但不知道如何在magento上做一样。有什么帮助吗

您可以修改此目录中的文件:

app/design/frontend/base/default/template/catalog/product
for example (list/ and list.phtml)
或您的模板,例如:

app/design/frontend/default/yourtemplate/template/directory with product files
您可以在以下位置找到CSS文件:

skin/frontend/

您还应该思考,第二个图像存储在哪里。在这种情况下,您可以使用“CSS精灵”——一个包含两张照片的图像文件。缺点是,您必须自定义magento显示产品图像的每个页面

或者,您必须定义确切的订单。第一个图像是前视图,第二个图像始终是后视图

编程部分其实并不难。看

app/design/frontend/base/default/template/catalog/product/list.phtml
对于目录视图。如果有自定义模板,则路径可能会有所不同。在Magento后端,有一个显示实际路径的功能(系统->配置->开发工具)

您可以将Javascript直接写入list.phtml。Magento还直接在.phtml文件中编写JS代码。当然它不是很漂亮,但Magento是如此复杂;如果其他人使用商店系统,则更容易找到

请记住,list.phtml包含两种布局:网格和列表视图。如果你做了一个改变,你会想,为什么你看不到前端的改变;-)

你会在这里找到答案