update to add good name for recommend-for-you. code review by HongFei
Showing
2 changed files
with
12 additions
and
1 deletions
@@ -37,10 +37,18 @@ | @@ -37,10 +37,18 @@ | ||
37 | } | 37 | } |
38 | } | 38 | } |
39 | } | 39 | } |
40 | + .sale-name { | ||
41 | + overflow: hidden; | ||
42 | + text-overflow: ellipsis; | ||
43 | + width: 100%; | ||
44 | + white-space: nowrap; | ||
45 | + margin-top: pxToRem(20px); | ||
46 | + color: gray; | ||
47 | + } | ||
40 | 48 | ||
41 | .price { | 49 | .price { |
42 | position: relative; | 50 | position: relative; |
43 | - margin-top: pxToRem(20px); | 51 | + margin-top: pxToRem(8px); |
44 | font-size: pxToRem(24px); | 52 | font-size: pxToRem(24px); |
45 | line-height: 1; | 53 | line-height: 1; |
46 | 54 |
@@ -4,6 +4,9 @@ | @@ -4,6 +4,9 @@ | ||
4 | {{#recommendList}} | 4 | {{#recommendList}} |
5 | <a class="swiper-slide" href="{{url}}"> | 5 | <a class="swiper-slide" href="{{url}}"> |
6 | <img class="swiper-lazy img-box" data-src="{{thumb}}"> | 6 | <img class="swiper-lazy img-box" data-src="{{thumb}}"> |
7 | + <div class="sale-name"> | ||
8 | + {{name}} | ||
9 | + </div> | ||
7 | <div class="price"> | 10 | <div class="price"> |
8 | <span class="sale-price {{^price}}no-price{{/price}}">¥{{salePrice}}</span> | 11 | <span class="sale-price {{^price}}no-price{{/price}}">¥{{salePrice}}</span> |
9 | {{#price}}<span class="old-price">¥{{.}}</span>{{/price}} | 12 | {{#price}}<span class="old-price">¥{{.}}</span>{{/price}} |
-
Please register or login to post a comment