Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth...
分类:
其他好文 时间:
2014-07-24 10:06:33
阅读次数:
191
1.以屏幕可用宽和高的百分比来定义弹出框的宽和高var trueWidth = $(top.window).width() * 0.9;var trueHeight = $(top.window).height() * 0.9;2.光标离开时验证是否数字//jsfunction CheckIsNan...
分类:
Web程序 时间:
2014-07-24 10:03:13
阅读次数:
261
style="padding-bottom: 0px; line-height: 1.5; margin: 0px; padding-left: 0px; padding-right: 0px; font-family: 宋体, Arial; font-size: 14px; padding-top...
分类:
系统相关 时间:
2014-07-23 20:34:05
阅读次数:
288
基本思路:使用定时器让物体向右运动,在运动的过程中再不是匀速运动,而是先快后慢,但是到达终点的时候,必须注意要使用向上取整函数Math.ceil()和向下取整函数Math.floor();这样才能够正确无误地到达终点,而不是有出入。
#div1{
width:100px;
height:100px;
background:red;
position:ab...
分类:
Web程序 时间:
2014-07-23 13:36:26
阅读次数:
224
#div1{
width:100px;
height:150px;
background:red;
position:absolute;
right:0;
bottom:0;
}
window.onscroll=function (){
var oDiv=document.getElementById('div1');
var s...
分类:
Web程序 时间:
2014-07-23 13:33:26
阅读次数:
216
#div1{
width:100px;
height:150px;
background:red;
position:absolute;
right:0;
bottom:0;
}
window.onscroll=function (){
var oDiv=document.getElementById('div1');
var s...
分类:
Web程序 时间:
2014-07-23 13:33:17
阅读次数:
286
如果只为div添加一个定时器的话,在多个div变宽的时候会发生问题,但是如果为每个div添加一个定时器,那么就可以实现多个物体变宽,具体代码如下:
div{
width:100px;
height:50px;
background:red;
margin:10px;
}
window.onload=function (){
var aDiv=docume...
分类:
Web程序 时间:
2014-07-23 13:15:59
阅读次数:
220
100% Height CSS100% Height Demo内容内容内容内容此demo可实现container撑满浏览器的高度
分类:
Web程序 时间:
2014-07-23 12:52:36
阅读次数:
267
在一次实现中需要用span实现模拟一个点:.dot{ display:block; width:3px; height:3px; background-color:#ccc;} 但是在其他浏览器里面显示正常,在ie6中显示会变成一个长方形。原因是在ie6中有个最小的高度,当...
分类:
其他好文 时间:
2014-07-23 12:43:06
阅读次数:
181
1、div的高度已知---line-hight 固定高宽,图片垂直局中 只要给容器设置 line-height 和 height,并使两值相等,再加上 over-flow: hidden1.同时支持块级和内联极元素2.支持所有浏览器3.IE中不支持img等...
分类:
Web程序 时间:
2014-07-23 11:58:47
阅读次数:
418