之前的笔记整理(2)
2013年11月13日 星期三
通过siblings() 方法来实现鼠标经过,其余图片变暗的效果
HTML代码: <div class="imglist"> <a href="#"><img src="images/530_1.jpg"></a> <a href="#"><img src="images/530_2.jpg"></a> <a href="#"><img src="images/530_3.jpg"></a> </div> CSS: .imglist {float:left; width:580px;} .imglist a{float:left; background-color:#000;} JS部分: $(function(){ $(".imglist").find("a").each(function() { $(this).hover(function(){ //当鼠标移上去时 //它的兄弟图片透明度降到0.7 $(this).siblings().find("img").stop().fadeTo("slow",0.7); },function(){ //当鼠标移出的时候 //它的兄弟图片透明度回到1 $(this).siblings().find("img").stop().fadeTo("slow",1); }); })
2013年11月18日 星期一
网页在重构以及测试的时候需要注意不同文件夹里面的公共header以及footer部分的修改、登录以及未登录两种状态不同的显示效果