我正在为wooCommerce中的“店面”主题创建一个子主题。虽然,产品显示奇怪(见下图)。提前谢谢。
CSS
.products {
display: inline-block;
vertical-align: top;
margin-left: 50px;
width: 500px;
}
ul.products li.product {
width: 200px;
margin-left: 50px;
margin-bottom: 15px;
cursor: pointer;
}
li.product img {
width: 200px;
margin: 0;
}
ul.products li.product img {
margin-bottom: 10px;
}
.woocommerce-loop-product__title {
float: left;
width: 100px;
text-align: left;
margin: 0;
color: #323332;
font-family: "Arial", sans-serif;
font-size: 12px;
vertical-align: top;
display: inline-block;
line-height: 20px;
margin-top: 0;
}
ul.products li.product .woocommerce-loop-product__title {
font-size: 14px;
font-weight: 600;
margin-bottom: 0;
}
ul.products li.product p {
color: #323332;
width: 100%;
font-family: "Arial", sans-serif;
font-size: 14px;
text-align: left;
line-height: 20px;
font-weight: 300;
margin: 0;
}
.price {
float: right;
width: 100px;
text-align: right;
margin: 0;
color: #323332;
font-family: "Arial", sans-serif;
font-size: 12px;
vertical-align: top;
display: inline-block;
line-height: 20px;
margin-top: 0;
}
.price span {
color: #323332;
font-size: 14px;
}
.product-sidebar-fixed {
position: fixed;
left: 500px;
top: 80px;
}
.onsale {
position: absolute;
top: 0;
right: 0;
background-color: #fff;
color: #E02D0D;
border-radius: 0;
font-size: 14px;
border: none;
}
.price ins span {
color: #E02D0D;
}
编辑:它们应该在行中显示,每行有两个产品。前两个和后两个正确显示,而黄色产品(产品2)旁边没有任何产品。