vincent_ds
<script type="text/javascript">
var offset = $("#health_alert").offset();
var alert_top = offset.top;
var window_height =$(window).height();
var alert_hight = $("#health_alert").outerHeight();
var alert_top = ( window_height - alert_hight )/ 2;
$("#health_alert").offset({ top: alert_top});
//alert(alert_hight);
</script>

http://api.jquery.com/height/

http://api.jquery.com/offset/

分类:

技术点:

相关文章:

  • 2021-07-07
  • 2021-12-28
  • 2021-09-24
  • 2021-12-29
  • 2021-12-31
  • 2022-01-12
  • 2021-07-31
猜你喜欢
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-23
相关资源
相似解决方案