唐sir 找到方法了,这样可以解决if (@available(iOS 11.0, *)) { _wkWebView.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; }