2014-03-12 31 views
-2

我在css中有以下代码,我知道如何为div分配不同的样式,但我只想在CSS中添加不同的样式,这可能吗?如何在wordpress中设置页面样式?

该网站是在WordPress,这里的链接:

http://thinkstudio.co.za/canconsulting/presentation-design-gallery/

.gallery-filter a { 
    width: auto; 
    display: inline-block; 
    width: auto; 
    color: #ffffff; 
    font-size: 9px; 
    font-family:"Helvetica Neue", Helvetica, Arial, sans-serif; 
    font-weight: bold; 
    text-transform: uppercase; 
    -webkit-border-radius: 3px; 
    -moz-border-radius: 3px; 
    -o-border-radius: 3px; 
    -ms-border-radius: 3px; 
    -khtml-border-radius: 3px; 
    border-radius: 3px; 
    background-color: #fb6334; 
    padding: 3px 9px; 
    margin: 4px 8px 3px 0; 
    -webkit-transition: background-color 230ms linear; 
    -moz-transition: background-color 230ms linear; 
    transition: background-color 230ms linear; 
} 


.gallery-filter a:hover, .gallery-filter .active { 
    background-color:#09b7f8; 
} 
+1

'我知道如何分配不同的造型给DIV的,但我想在CSS中添加不同的造型only'你在说什么关于 ?如果你知道如何设计你的div,那么问题在哪里? – HamZa

+0

我真的不明白你的问题。 –

+0

不要担心生病请咨询谷歌,谢谢 –

回答

1

如果我有你的权利,你想样式的锚,而无需使用的ID。

CSS例子:(:第n个孩子的方法)

.gallery-filter a:nth-child(1) { 
    background: red; 
} 
.gallery-filter a:nth-child(2) { 
    background: green; 
} 
.gallery-filter a:nth-child(3) { 
    background: blue; 
} 
.gallery-filter a:nth-child(4) { 
    background: yellow; 
} 

http://jsfiddle.net/yauZr/

+0

是的,这是我想要做的......谢谢SOOOOO多!!!!!!!你让我今天一整天都感觉很好!!!! –

+0

np,我很高兴能帮上忙。当你对答案满意时,检查绿色标记(接受答案)。 ;) –

相关问题