摘要:
moveInit("#inner_event .event_one",226);function moveInit(a,w){ _length=$(a).length; _lastLeft=(_length-1)*w; _firstLeft=-w; for (var i=0; i=_length){ var _first=aarr[0]; _first.css({left:_lastLeft+"px"}); aarr.shift(); //移除最前一个元素... 阅读全文
摘要:
Ruby之父松本行弘和我们老板佐々木真弥的合影: 阅读全文
摘要:
吸住底部菜单IE7和IE8下会卡死的算法#contact{position:relative; height:61px; width:100%; display:inline-block; background:#f9f9f9; z-index:999; }function fixedBar(){ var _height=$(this).height()+$(this).scrollTop(); var _top=$("#contact").offset().top; var _bar=$("#contact").height(); if($(this) 阅读全文
摘要:
media type(媒体类型)是css 2中的一个非常有用的属性,通过media type我们可以对不同的设备指定特定的样式,从而实现更丰富的界面。media query(媒体查询)是对media type的一种增强,是CSS 3的重要内容之一。随着移动互联网的发展,media query开始得到大家的重视。media type让我们先了解一下media type,其实这个大家会比较熟悉一点,我们通常会用到的media type会是all 和screen,然后是print,一些网站会专门通过print类型为页面的打印格式提供更友好的界面。其实,media type有很多种:类型解释all所有 阅读全文
摘要:
在ipad、iphone网页开发中,我们很可能需要判断是横屏或者竖屏。下面就来介绍如何用 jQuery 判断iPad、iPhone、Android是横屏还是竖屏的方法。代码如下:function orient() {if (window.orientation == 90 || window.orientation == -90) {//ipad、iphone竖屏;Andriod横屏$("body").attr("class", "landscape");orientation = 'landscape';return 阅读全文
摘要:
mac上为了不在登录画面看到其他账户,我禁用了root账户,而每次用Terminal的时候,先获得sudo账户的权限:sudo -smac本身就安装有rubyruby -v查看当前安装的ruby版本接下来安装RubyGems,它是一个rails框架的组件管理工具gem update --system... 阅读全文
摘要:
大家都知道响应式布局的要素有几点:1.用百分比来定位,好处是不需要用js就可以根据浏览器的缩放拉伸和缩小元素。2.用em来作为度量单位。由于是相对单位,比像素更灵活一点。虽然在我目前还没发现经过viewport转换后em和px用起来有什么区别 t.t3.在HTML中为media query准备好4.对移动设备使用media query,常用的有:/*pad*/@media screen and (min-width: 769px){}/*horizontal iphone5 568x320*/@media screen and (max-width: 768px) and (min-width 阅读全文
摘要:
jQuery(function($) {// var menuYloc = $(".div-scroll").offset().top;// $(window).scroll(function (){ // var offsetTop = menuYloc + $(window).scrollTop() +"px";// $(".div-scroll").animate({top : offsetTop },{ duration:50 , queue:false });// }); var randomGroup = [ $(' 阅读全文
摘要:
function shieldStyle(){ this._styleStartArr=["/g,""); otherStr=otherStr.replace(//g,""); otherStr=otherStr.replace(//g,""); otherStr=other... 阅读全文