我在magento(tintinportintin.com.br)有一个商店,我想自定义类别页面,为每个类别页面添加特定颜色。例如,我希望家庭和所有页面的菜单在类别x中是蓝色的,在类别y中是红色的。谁能帮我?自定义类别页面
Q
自定义类别页面
0
A
回答
0
html body标签包含每个类别的类名,所以一种无编程方式来做到这一点,就是使用css。
<body class=" catalog-category-view categorypath-pulseiras-casual-html category-casual">
在你的style.css
<body class=" catalog-category-view categorypath-colares-html category-colares">
所以(你可以添加到末尾)
.categorypath-colares-html #nav{
background-color: black;
}
.categorypath-colares-html #nav a{
color:red;
}
.categorypath-pulseiras-casual-html #nav a{
color:blue;
}
.categorypath-pulseiras-casual-html #nav{
background-color: black;
}
(唯一的限制是,如果你改变类别名称,那么你将需要更新css)
0
在我的商店指的style.css文件到#nav
/* Classes specifying background and other settings for navigation bar */
.navbar {
background-position:top left;
background-repeat:repeat-x;
float:left;
width:944px; /* 944 = 960 - 2*8 */
height:41px;
padding-top:10px;
}
.navbar-left {
background-position:0 -51px;
width:8px;
height:51px;
float:left;
}
.navbar-right {
background-position:100% -51px;
width:8px;
height:51px;
float:left;
}
0
我的style.css指的是导航背景:
.categorypath-colares-html #nav{
background-color: #b7ea2c;
background:url(../images/img/navbar-lightgreen.png) no-repeat;
}
.categorypath-colares-html #nav a{
color:#b7ea2c;
}
相关问题
- 1. 自定义类别页面模板
- 2. 如何自定义wordpress类别页面
- 3. WordPress自定义类别页面显示空白页面
- 4. 自定义分类thumnbails类别页面上的自定义帖子类型
- 5. 自定义页面类
- 6. 自定义帖子类型的类别列表页面
- 7. 从woocommerce产品类别页面添加自定义主体类
- 8. 在header.php中包含特定类别页面的自定义jQuery
- 9. 定义类别页面在Magento
- 10. 如何创建自定义页面的类别和单页面的指定类别与其子在wordpress
- 11. 从类别页面以外的自定义类别属性中获取值
- 12. 如何创建一个WordPress自定义类别页面
- 13. 自定义菜单链接不在类别页面中工作
- 14. Joomla 3自定义类别博客页面
- 15. 从自定义页面删除/隐藏类别栏
- 16. 自定义页面类型的Kentico URL别名
- 17. 分页自定义帖子类型与自定义类别/分类
- 18. Scala TabbedPane自定义页面子类
- 19. 自定义分类结果页面
- 20. 自定义分类和页面列表
- 21. 如果页面是typeof自定义类
- 22. 自定义文章类型的WordPress自定义搜索页面
- 23. 自定义搜索WordPress的自定义帖子类型页面
- 24. 自定义父类别和子类别
- 25. Android自定义类别
- 26. 列表自定义类别
- 27. 自定义类别属性
- 28. Wordpress和链接页面到自定义帖子类型页面
- 29. Wordpress自定义帖子类型页面为父页面
- 30. Kentico - 自定义页面类型页面的条件
我应该在自定义布局更新框中添加此,在分类管理页面? –
我会将它添加到/ skin/frontend/default/{local主题} /css/styles.css –
对不起,但没有解决。 –