Showing
2 changed files
with
20 additions
and
0 deletions
@@ -849,4 +849,12 @@ $('#collect').on('touchstart', function(e) { | @@ -849,4 +849,12 @@ $('#collect').on('touchstart', function(e) { | ||
849 | } | 849 | } |
850 | }); | 850 | }); |
851 | 851 | ||
852 | +//根据热门品类的个数来改变样式展示 | ||
853 | +if ($('.category-list li').length % 4 !== 0) { | ||
854 | + $('.category-list li:last-child').addClass('category-list-last-li'); | ||
855 | +} | ||
852 | 856 | ||
857 | +if ($('.category-list li').length < 4) { | ||
858 | + $('.category-list').addClass('category-list-top-board'); | ||
859 | + $('.category-list').find('.buriedpoint').addClass('category-list-only-one-row'); | ||
860 | +} |
@@ -505,4 +505,16 @@ | @@ -505,4 +505,16 @@ | ||
505 | transform: rotate(-180deg); | 505 | transform: rotate(-180deg); |
506 | } | 506 | } |
507 | } | 507 | } |
508 | + | ||
509 | + .category-list-top-board { | ||
510 | + border-top: 1px solid #e0e0e0; | ||
511 | + } | ||
512 | + | ||
513 | + .category-list-last-li { | ||
514 | + border-right: 1px solid #e0e0e0; | ||
515 | + } | ||
516 | + | ||
517 | + .category-list-only-one-row { | ||
518 | + border-top: none!important; | ||
519 | + } | ||
508 | } | 520 | } |
-
Please register or login to post a comment