Authored by xuqi

category height

@@ -15,6 +15,18 @@ var $curContent = $contents.not('.hide'); @@ -15,6 +15,18 @@ var $curContent = $contents.not('.hide');
15 15
16 var navHammer, ccHammer; 16 var navHammer, ccHammer;
17 17
  18 +//初始化container高度
  19 +(function() {
  20 + var $header = $('.yoho-header'),
  21 + $search = $('#search-input');
  22 +
  23 + var h = $(window).height() - $header.outerHeight() - $search.outerHeight() - $nav.outerHeight();
  24 +
  25 + $categoryContainer.css('min-height', h);
  26 +
  27 + $contents.height(h);
  28 +}());
  29 +
18 $('#search-input').focus(function() { 30 $('#search-input').focus(function() {
19 $(this).blur(); 31 $(this).blur();
20 }); 32 });
@@ -68,15 +68,18 @@ @@ -68,15 +68,18 @@
68 } 68 }
69 } 69 }
70 70
71 - .content.hide {  
72 - display: none; 71 + .content {
  72 + background: #f8f8f8;
  73 +
  74 + &.hide {
  75 + display: none;
  76 + }
73 } 77 }
74 78
75 .primary-level { 79 .primary-level {
76 float: left; 80 float: left;
77 box-sizing: border-box; 81 box-sizing: border-box;
78 width: 40%; 82 width: 40%;
79 - background: #f8f8f8;  
80 83
81 > li { 84 > li {
82 height: 69rem / $pxConvertRem; 85 height: 69rem / $pxConvertRem;
@@ -95,6 +98,8 @@ @@ -95,6 +98,8 @@
95 padding-left: 20rem / $pxConvertRem; 98 padding-left: 20rem / $pxConvertRem;
96 background: #fff; 99 background: #fff;
97 width: 60%; 100 width: 60%;
  101 + height: 100%;
  102 + overflow: auto;
98 } 103 }
99 104
100 .sub-level { 105 .sub-level {