摘要: $(function(){ var h = $(document).height()-$(window).height(); $(document).scrollTop(h); }); \ window.onload = function(){ var h = document.documentEl 阅读全文
posted @ 2017-06-01 15:22 佟舟 阅读(5315) 评论(0) 推荐(0) 编辑
摘要: 这样写: 1 2 3 4 5 6 7 8 9 10 11 12 $(".aa").on("mouseout",function(){ var obj = $(this); setTimeout(function(){ rc(obj); },1000); }) function rc(obj){ ob 阅读全文
posted @ 2017-05-02 13:16 佟舟 阅读(878) 评论(0) 推荐(0) 编辑
摘要: 一、前言在如今各个分辨率显示器N足鼎立的时期,页面采用流动性布局(亦可称自适应布局)不失为一个好选择。当然,具体实现不是那么容易,需要一定的css功力和实践经验。本文不讲细节,只讲外部的自适应架构,这也是实现整个页面自适应的前提。目前为止,我所熟知的左中右三栏宽度自适应于浏览器的方法有三个:绝对定位 阅读全文
posted @ 2017-05-02 11:51 佟舟 阅读(906) 评论(0) 推荐(0) 编辑
摘要: rt 阅读全文
posted @ 2017-05-02 11:37 佟舟 阅读(639) 评论(0) 推荐(0) 编辑
摘要: //1、获取和设置样式 $("#tow").attr("class")获取ID为tow的class属性 $("#two").attr("class","divClass")设置Id为two的class属性。 //2、追加样式 $("#two").addClass("divClass2")为ID为tw 阅读全文
posted @ 2017-05-02 11:35 佟舟 阅读(473) 评论(0) 推荐(0) 编辑
摘要: $("p").css("color","red"); $("p").css({ "font-size":"8px", "background-color":"#8888888"}); $("div").animate({"width":"200px"}); $("div").animate({ "w 阅读全文
posted @ 2017-05-02 11:29 佟舟 阅读(5124) 评论(0) 推荐(0) 编辑
摘要: xhtml中隐藏滚动条在用ie6浏览有框架的xhtml页面的时候,默认会水平和垂直滚动条会一起出现,这是ie6的一个bug,在firefox上是正常的,出现的原因是其对XHTML 1.0 transitional doctype的解释缺陷.对于这个bug一般有3种解决方案,方法1: 代码如下: ht 阅读全文
posted @ 2017-05-02 11:20 佟舟 阅读(150798) 评论(1) 推荐(1) 编辑
摘要: 代码如下: showDiv($("#pop"));function showDiv(obj){ $(obj).show(); center(obj); $(window).scroll(function(){ center(obj); }); $(window).resize(function(){ 阅读全文
posted @ 2017-05-02 11:14 佟舟 阅读(1324) 评论(0) 推荐(0) 编辑
摘要: 外层DIV{position:realtive}内层DIV{positon:absolute;top:50%;left:50%;margin-top:-100px;margin-left:-150px;width:300px;height:200px;} 阅读全文
posted @ 2017-05-02 11:11 佟舟 阅读(1765) 评论(0) 推荐(0) 编辑