Commit 18186c6c by wd

修复banenr高度为0

parent bcaf6dad
...@@ -53,12 +53,13 @@ require(['jquery','banner'],function ($){ ...@@ -53,12 +53,13 @@ require(['jquery','banner'],function ($){
h_max = h > h_max ? h : h_max; h_max = h > h_max ? h : h_max;
}); });
$('.banner1').height(h_max); if (h_max > 0){
$('.banner1').css('line-height',h_max+'px'); $('.banner1').height(h_max);
var buttonTop = h_max/2; $('.banner1').css('line-height',h_max+'px');
$('#left').css({'top':buttonTop,'line-height': 0}); var buttonTop = h_max/2;
$('#right').css({'top':buttonTop,'line-height': 0}); $('#left').css({'top':buttonTop,'line-height': 0});
$('#right').css({'top':buttonTop,'line-height': 0});
}
if (img_arr.length <= 1){ if (img_arr.length <= 1){
$('.banner1 .list').hide(); $('.banner1 .list').hide();
$('#left').hide(); $('#left').hide();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment