我正在制作一个日历网站.在这里我有一个日历div,其中日历加载,包含在内容div中.在这个页眉和页脚是固定的位置.日历加载蓝色部分.

<div class ="content">
<div id="calendar"></div>
</div>
Run Code Online (Sandbox Code Playgroud)
.content{
background: #fcfcfc;
height: 100%;
margin: -70px 0 -20px;
padding: 70px 0 20px;
}
#calendar{
background: #fcfcfc;
margin: 10px 10px 10px 10px;
border: 1px solid #888;
}
Run Code Online (Sandbox Code Playgroud)
var calHeight = $(".content").height();
Run Code Online (Sandbox Code Playgroud)
从图像我认为calHeight应该给390左右的东西,但它在chrome中给出594和在firefox中给出565..
我该怎么做才能让calHeight显示大小?
| 归档时间: |
|
| 查看次数: |
9668 次 |
| 最近记录: |