Cannot change horizontal rule color on hover

I'm able to change the background and font-color of my unordered list on hover.

However, I cannot get my horizontal rule to change to the same color.

I'm trying to achieve the same style as on thewhitecompany.com

    li {
    width: 250px;
    min-height: 300px;
    display: -moz-inline-stack;
    display: inline-block;
    vertical-align: middle;
    margin: 20px;
    zoom: 1;
    *display: inline;
    _height: 250px;
    cursor: pointer;
    -o-transition:.5s;
    -ms-transition:.5s;
    -moz-transition:.5s;
    -webkit-transition:.5s;
    /* ...and now for the proper property */
    transition:.5s;    }
li:hover {
    background-color: #746262;
    color: #ffffff;
}
li p {
    font-size: 14px;
}
li h2 {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2px;
}


<div style="text-align: center; vertical-align: middle;">
<li>

        <img src="http://farm4.static.flickr.com/3623/3279671785_d1f2e665b6_s.jpg" alt="lobster" width="100%" height="160"/>
        <div style="padding: 5px;">
            <h2>Product</h2>
            <hr width="80%" />
            <p>Exclusive designs by Rose Eddington<br />Including 15 notelets and envelopes</p>
            <span style="text-transform:uppercase; font-size: 12px;">Just £6.95</span>
        </div>
</li>
</div>

I hope somebody can help, thank you!


JSFiddle Demo

Add

CSS

li:hover hr { border-color:orange }

What you are looking for is to change the border-color.

Test this: (Live demo here )

li:hover hr { 
border-color: #746262;
}
li:hover {
background-color: #746262;
color: #ffffff;
}
链接地址: http://www.djcxy.com/p/15754.html

上一篇: jquery动画下一个和prev元素

下一篇: 悬停时无法更改水平标尺颜色