1

ホバー時に順序付けられていないリストの背景とフォントの色を変更できます。

ただし、水平線を同じ色に変更することはできません。

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>

誰かが助けてくれることを願っています、ありがとう!

4

2 に答える 2