我正在重新设计我的网站, 突然之间, 屏幕宽度显示不正确。我有2015年中的MacBook Pro, 屏幕宽度为1440×900。我有一个jQuery脚本, 它告诉我我网站的屏幕宽度, 该宽度假定为1440px。今天早晨, 当我启动网站时, jQuery脚本显示我的网站宽度为1425像素。当我在浏览器中隐藏滚动条时, 它恢复正常。在Chrome中也会发生这种情况。
http://wpfreelance.bayoumedia.net/
#1
在jquery中使用它来获取实际的屏幕宽度, 而无需滚动条。
var actualInnerWidth = $("body").prop("scrollWidth");
#2
$(window).width()应该显示窗口的实际宽度, 无论是否存在滚动条, 它应该与1440px相匹配。
$(” body”)。prop(” scrollWidth”)将与滚动条(如果有)匹配的宽度匹配。因此, 猜猜这就是你正在使用的那个
来源:
https://www.srcmini02.com/65799.html
微信公众号
手机浏览(小程序)
Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(): Failed to enable crypto in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_37206.jpg): failed to open stream: operation failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57