如何在wordpress中设置页面样式?

时间:2014-03-12 11:02:47

标签: css

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

网站是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 个答案:

答案 0 :(得分:1)

如果我找到了你,你想要在不使用ID的情况下设置锚点的样式。

CSS示例:(:nth-​​child方法)

.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/