fix video style

This commit is contained in:
chiu 2021-09-02 05:38:12 +00:00
parent b2aa2e15d7
commit 1d1be337c4
1 changed files with 2 additions and 2 deletions

View File

@ -177,9 +177,9 @@
<% end %> <% end %>
} }
function jplayer_center_video_front(ele){ function jplayer_center_video_front(ele){
$(ele).css('margin-left',($(ele).parent().width()-$(ele).width())/2); $(ele).css('margin-left',-Math.abs($(ele).parent().width()-$(ele).width())/2);
if($(ele).parents('.w-ba-banner').length>0){ if($(ele).parents('.w-ba-banner').length>0){
$(ele).css('margin-top',($(ele).parents('.w-ba-banner').eq(-1).height()-$(ele).height())/2); $(ele).css('margin-top',-Math.abs($(ele).parents('.w-ba-banner').eq(-1).height()-$(ele).height())/2);
} }
$(ele).css('transform','unset'); $(ele).css('transform','unset');
} }