stickUp插件用于实现固定菜单栏效果,原理很简单,说白了就是监听document的scroll事件,滚动到特定值时,将特定元素的position设置为fixed,核心代码如下: 1 $(document).on('scroll', function() { 2 ...
分类:
Web程序 时间:
2014-06-19 08:39:07
阅读次数:
273
new document div{position:absolute;width:200px;height:200px;left:0;top:0;right:0;bottom:0;margin:auto;border-radius:50%;backgroun...
分类:
Web程序 时间:
2014-06-18 21:43:53
阅读次数:
358
css:#profile_block{text-align:center;position:absolute; top:60px; right:10px;}#blog-calendar{border-radius: 7px;background:#fff;}#p_b_follow{padding-t...
分类:
其他好文 时间:
2014-06-18 19:09:20
阅读次数:
198
项目中用的grunt-contrib-less, 写了以下less代码.mapfix{ position: fixed; top:10px; width: 430px; z-index: 100; background: #fff; -position:absolute; top:exp...
分类:
Web程序 时间:
2014-06-17 15:26:30
阅读次数:
239
今天刚结束一场面试(含笔试),对自己的表现不太满意,感觉没有发挥好应有的水平,也只能怪自己平时没有及时积累和整理知识,准备也不充分。 就不扯那么多了,下面是我面试时,没能答上或者觉自己回答的不够好的题目。 1.position属性规定元素的定位类型值描述absolute生成绝对定位的元素,相...
分类:
Web程序 时间:
2014-06-17 12:51:05
阅读次数:
309
在博客《HTML CSS——position学习终结者(一)》中我们认识到如果某一absolute作用的元素的父对象(或曾祖父,只要是父级对象)设置了position属性且position的属性值为absolute、relative或者fixed,那么这个子元素会参照离它(指子元素)最近的且position的属性值为absolute、relative或者fixed的父元素进行定位,子元素的定位点为父元素的左上角,学习过padding的人可能会这样想:这个时候如果父元素设置了padding样式,那absolu...
分类:
Web程序 时间:
2014-06-16 19:26:45
阅读次数:
316
题目
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.
You may assume no duplicates i...
分类:
其他好文 时间:
2014-06-15 17:27:16
阅读次数:
251
简单说下,获取SDcard里的图片或者视屏缩略图就不说了,网上很多,主要写下加载图片的方式,在Grideview的Adapter中getView()方法中定义:
//异步加载图片,实现一张张显示
new LoadImageAsyctask(gridViewHold.icon).execute(paths[position]);
class LoadImag...
分类:
移动开发 时间:
2014-06-15 08:12:31
阅读次数:
193
1、position:static 所有的元素的默认定位都是position:static,这意味着元素没有被定位,而且在文档中出现在它应该在的位置。2、position:relative 如果设定position:relative,就可以使用top,bottom,left和right来相对于元素....
分类:
Web程序 时间:
2014-06-14 19:38:05
阅读次数:
223
css position的使用css 的 position 属性是用来设置元素的位置的,它还能设置一个元素出现在另一个元素的下层元素能用 top,bottom,left 和 right 属性设置位置, 但是在默认情况下是不管用的,除非先设置了position属性,HTML 元素的位置默认是设置为静态...
分类:
Web程序 时间:
2014-06-14 18:12:54
阅读次数:
294