上下垂直居中 在线演示 DIVCSS5
#main {
position: absolute;
width:400px;
height:200px;
left:50%;
top:50%;
margin-left:-200px;
margin-top:-100px;
border:1px solid #00F
}
/*css注释:为了方便截图,对CSS代码进行换行*/
DI...
分类:
Web程序 时间:
2014-06-05 11:36:39
阅读次数:
253
【题目】
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:
Integers in each row are sorted from left to right.
The first integer of each row is greater than the last integer of the previous ...
分类:
其他好文 时间:
2014-06-05 08:28:43
阅读次数:
321
一、基本语法:window.open(pageURL,name,parameters)其中:pageURL 为子窗口路径name 为子窗口名字parameters 为窗口参数(各参数用逗号分隔)二、示例
window.open('page.html','newwindow','height=500,width=800,top=0,left=0,
toolbar=no,menuba...
Java线程的join方法可用于暂停当前线程的执行直至目标线程死亡。Thread中一共有三个join的重载方法。
public final void join():该方法将当前线程放入等待队列中,直至被它调用的线程死亡为止。如果该线程被中断,则会抛出InterruptedException异常。
public final synchronized void join(long...
分类:
编程语言 时间:
2014-06-05 03:41:18
阅读次数:
243
Legend, 翻译过来的意思是图例。
在Extjs 的Chart 中, 到底右边红色框起来的部分就是Legend 了。
在 Extjs Chart 的定义中, 可以通过配置 legend 的配置值(configs)来设置Legend 显示的位置和样式:
position 配置显示的位置:可以设置的值有 "top","bottom", "left", "right", or "float"。
其他还可以设置图例显示的文字、图的样式等等, 详细可以参见 Ext.chart.Legend 的参考文档。代...
分类:
Web程序 时间:
2014-06-04 22:49:05
阅读次数:
526
【题目】
Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.
You should pack your words in a greedy approach; that is, pack as many words as you can in each line. Pad ...
分类:
其他好文 时间:
2014-06-04 22:37:46
阅读次数:
389
SHL、SHR、SAL、SAR: 移位指令
;SHL(Shift Left): 逻辑左移
;SHR(Shift Right): 逻辑右移
;SAL(Shift Arithmetic Left): 算术左移
;SAR(Shift Arithmetic Right): 算术右移
;其中的 SHL 和 SAL 相同, 但 SHR 和 SAR 不同...
分类:
其他好文 时间:
2014-06-03 03:21:11
阅读次数:
365
思路:在自定义shape中增加一层或多层,并错开,即可显示阴影效果。为增加立体感,按钮按下的时候,只设置一层。我们可以通过top, bottom, right 和 left 四个参数来控制阴影的方向和大小。关系图以下自定义两种阴影效果:res/drawable-hdpi/shadow1.xml
...
分类:
移动开发 时间:
2014-06-01 11:18:34
阅读次数:
320
1.垂直居中有时我们会使用margin: 0
auto;作居中使用。但有的时候我们需要垂直居中,例如在div里面垂直居中显示一张加载中的gif图。下面这种写法就可以完美实现:垂直居中的子容器 {
position: absolute; left: 0; right: 0; ...
分类:
Web程序 时间:
2014-05-31 20:15:24
阅读次数:
261
1.清除浮动下面是两种常用的方式,而这两招也够用了(不用千招会,只需一招精)。1.结尾处加空div标签clear:both
Left Right 缺点:每次清除浮动都加空div,影响了HTML的结构,例如如果要算div的个数,都会被影响到。2.父级div定义伪类:after...
分类:
Web程序 时间:
2014-05-31 20:02:28
阅读次数:
332