Authored by ccbikai

为您优选价格颜色

@@ -36,13 +36,15 @@ @@ -36,13 +36,15 @@
36 } 36 }
37 37
38 .price { 38 .price {
  39 + position: relative;
39 margin-top: pxToRem(20px); 40 margin-top: pxToRem(20px);
40 font-size: pxToRem(20px); 41 font-size: pxToRem(20px);
41 line-height: 1; 42 line-height: 1;
42 43
43 span { 44 span {
44 - // chrome 最小支持12px  
45 - transform: scale(0.875); 45 + // chrome 最小支持12px, 设计图是 10px ,用CSS3变换
  46 + font-size: pxToRem(20px);
  47 + @include transform(scale(0.5));
46 } 48 }
47 49
48 .sale-price { 50 .sale-price {
@@ -50,7 +52,9 @@ @@ -50,7 +52,9 @@
50 } 52 }
51 53
52 .old-price { 54 .old-price {
53 - float: right; 55 + position: absolute;
  56 + top: 0;
  57 + right: 0;
54 color: #ededed; 58 color: #ededed;
55 } 59 }
56 60
@@ -7,8 +7,8 @@ @@ -7,8 +7,8 @@
7 <li class="swiper-slider"> 7 <li class="swiper-slider">
8 <img class="img-box" src="{{thumb}}"> 8 <img class="img-box" src="{{thumb}}">
9 <div class="price"> 9 <div class="price">
10 - <span class="sale-price"{{salePrice}}</span>  
11 - <span class="old-price"{{price}}</span> 10 + <span class="sale-price {{^price}}no-price{{/price}}"{{salePrice}}</span>
  11 + {{#price}}<span class="old-price"{{.}}</span>{{/price}}
12 </div> 12 </div>
13 </li> 13 </li>
14 {{/recommendList}} 14 {{/recommendList}}