第一步:先创建一个盒子,定义类为 nav,width 1000,height 40px,防京东的导航,与浏览器顶部100px,margin-top:100px,看的更直观第二步:使用无序列表放置,导航条的内容,这个可以自己定,这里设定 ul 宽1000px;高 40px;因为ul是块状元素,出现下面...
分类:
Web程序 时间:
2014-12-25 01:27:09
阅读次数:
390
1、行内元素不会应用width和height属性,可以设置line-height。2、行内元素margin-left,margin-right,padding-left,padding-right有效3、对于块级元素,未浮动的垂直相邻元素的上边界和下边界会被压缩。4、通过display:block;...
分类:
其他好文 时间:
2014-12-25 01:26:09
阅读次数:
286
Webkit 内核的浏览器在加载完图片之后才能获取宽和高。所以,我建议使用onload时间来获取图片的宽和高1 var img = $("img")[0]; // Get my img elem2 var pic_real_width, pic_real_height;3 $("") // Make...
分类:
编程语言 时间:
2014-12-25 01:23:16
阅读次数:
281
1、img元素 img{max-width: 100%; height: auto;}2、背景图片通过修改背景图片宽度高度达到适应显示。使用到css3的background-size,只支持IE9以上版本及现代浏览器。background-size: percentage | length | c....
分类:
其他好文 时间:
2014-12-25 00:03:08
阅读次数:
177
/**
* 把View绘制到Bitmap上
* @param view 需要绘制的View
* @param width 该View的宽度
* @param height 该View的高度
* @return 返回Bitmap对象
*/
public static Bitma...
分类:
移动开发 时间:
2014-12-24 21:34:52
阅读次数:
213
svg 元素 是一个矩形元素,用这个元素,可以你可以绘制矩形,设置矩形宽高,边框的宽度颜色,矩形的填充颜色,是否用圆角等rect 示例 这个矩形的 位置:用x和y属性定义,需要注意的是这个位置是相对于 这个矩形的父节点定义的 宽高:用height和width 属性定义 样式:在style属性里...
分类:
其他好文 时间:
2014-12-24 21:29:22
阅读次数:
222
可以在这找到解决方式:http://stackoverflow.com/questions/26797321/not-able-to-convert-zxing-into-portrait-mode-in-android重要的第二步2I在CameraManager类,方法getFramingRect替换intwidth=MIN_FRAME_WIDTH;intheight=MIN_FRAME_HEIGHT;
if(context.getResources().get..
分类:
移动开发 时间:
2014-12-24 18:33:44
阅读次数:
241
.spinner { width: 400px; height: 400px; background-color: #0cf; border-radius: 100%; -webkit-animation: scaleout 1.0s infinite ease-in-out;} @-...
分类:
Web程序 时间:
2014-12-24 17:59:05
阅读次数:
198
【题目】
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 of the two subtrees of every node n...
分类:
其他好文 时间:
2014-12-24 16:23:25
阅读次数:
200
移动端网页,要实现功能,如图片
初步想法,使用dl 给dl设置固定宽高 然后用overflow:auto设置滚动显示完整内容
碰到问题1:滚动条不显示,但是可以正常滚动,
解决办法/*--滚动条--*/
::-webkit-scrollbar{ width:5px; height:5px; background-color:#fff;}
::-webkit-scrollbar:hover...
分类:
移动开发 时间:
2014-12-24 14:47:02
阅读次数:
181