http://www.gwendolynbarnes.com/shop/
<ul class="products">
<li class="product first">
<a href="http://www.gwendolynbarnes.com/product/finis/">
<img width="117" height="150" src="http://www.gwendolynbarnes.com/wp-content/uploads/2013/11/1418362_10202191776019152_824444076_n-117x150.jpg" class="attachment-shop_small wp-post-image" alt="1418362_10202191776019152_824444076_n" />
<strong>Finis</strong>
<span class="price">$3,000</span>
</a>
<a href="/shop/?add-to-cart=68&_n=6e191bb906" class="button" rel="nofollow">Add to cart</a>
</li>
</ul>
那里的 HTML 我正在谈论这里涉及的 css
.products li .price {
color: #fff;
font-weight: bold;
font-size: 18pt;
color: #248022;
}
.products li strong {
font-size: 16pt;
padding-bottom: 10px;
color: #000;
}
.products li {
padding: 10px;
margin: 12px;
}
ul.products li {
width: 30%;
float: left;
padding-left: 100px;
}
.products li a img {
border: 20px solid #fff;
width: 175px;
height: auto;
margin-left: 15px;
margin-right: auto;
}
.products li a img:hover {
border: 20px solid #fff;
}
ul.products {
width: 100%;
float: left;
padding-left: 50px;
}
.products li {
padding: 0px 15px 0px 15px;
background-color: #fff;
border: 20px solid #fff;
}
a.button:hover, button.button:hover, input.button:hover, #review_form #submit:hover {
background: #71d56e;
text-decoration: none;
color: #000;
font-weight: bold;
}
a.button, button.button, input.button, #review_form #submit {
background: #ddd;
text-decoration: none;
color: #000;
font-weight: bold;
}
.products li strong {
font-size: 16pt;
color: #000;
}
您可以在http://www.gwendolynbarnes.com/shop/上更好地看到它
但是,当您将鼠标悬停在文本“Finis”上时,它会从图像中删除边框吗?无论如何,为什么文本与图像边框有任何关系?因为它在里面