(document).height()与$(window).height()值相等的问题原因

2017-01-17 10:36:02

原因:访问的Html文档不是标准的<!DOCTYPE html>导致jquery不能精确的算出高度

一开始做的时候是能获得正确的高度的,后来我又添加了一些样式,结果,这个高度计算的就有点高了,找了半天也没有找到愿意。


后来通过谷歌查询源代码,结果发现如下。

QQ截图20170116174134.png


突然明白原因了,我的网页是php后端渲染的,在渲染style的时候我出现了错误,把style渲染到了文档的外面,所以会出现这样的错误。

  • 2017-11-01 01:30:45

    解决第三方包内jar包冲突

    这个问题就是因为引入jar包的冲突,这时我们可以在build.gradle中添加如下代码,下方单独的是添加的代码

  • 2017-11-06 01:00:17

    撤销git add

    如何撤销git add,不小心执行了git add . 操作,但是又不能提交所有的文件,因为对应不同的分支,现在怎么样可以将git add 撤销回来

  • 2017-11-10 00:06:15

    CORS: credentials mode is 'include'

    XMLHttpRequest cannot load http://localhost/Foo.API/token. The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. Origin 'http://localhost:5000' is therefore not allowed access. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.