English 中文(简体)
罗马尼亚
原标题:HTML/CSS - give li class
  • 时间:2010-10-02 06:34:00
  •  标签:
  • html
  • css

只是试图在这个地点获得(组合)类别菜单,以便每个脂重有不同的彩色。

[网站链接载于下文评论]

你们现在可以看到,他们完全是蓝色的。 我能够具体说明列出的每类利的类别。

任何关于如何做到这一点的想法?

EDIT:这是“菜单”类的代码——我不敢肯定,如何在每一类物质中添加一个CSS类,因为从“工厂”中看似“所有类别”?

<?php  if(is_category() && in_category($current_id) || post_is_in_descendant_category($current_id)){?>
    <h1 style="display:none"> <?php single_cat_title(); ?> </h1>

    <ul class="portfolioCategs">
        <li><a href="<?php echo get_category_link(get_option( boldy_portfolio ))?>">All projects</a></li>

$categories = get_categories( hide_empty=1&child_of= .$categs); foreach ($categories as $cat) { echo "".$catname." "; echo ( cat_ID). "> .$cat->cat_name. ); } ?>

最佳回答

我们只是谈论一下安全局的权利?

与此类似?

ul.portfolioCategs li a.cat3:hover {background-color: #660099; }
ul.portfolioCategs li a.cat13:hover {background-color: #CC3300; }
ul.portfolioCategs li a.cat14:hover {background-color: #FF6600; }
ul.portfolioCategs li a.cat17:hover {background-color: #FF6666; }
ul.portfolioCategs li a.cat19:hover {background-color: #FF6699; }
ul.portfolioCategs li a.cat20:hover {background-color: #FF66CC; }
ul.portfolioCategs li a.cat21:hover {background-color: #FF66FF; }

如果你想要一个不变的背景,那么仅仅去掉:过去。

确保链接标有相应的类别。

<a class="cat13" href="http://www.some-things.net/?cat=13">Fashion</a>

PS. dont tag this as PHP and Wordpress when it s only CSS and RUS :

问题回答

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签