随笔分类 -  jq常用动效

摘要:<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>uploadPreview演示</title> <script src="uploadPreview.js" type="text/javascript 阅读全文
posted @ 2016-08-08 16:27 dongxiaolei
摘要:$(".infom_con").each(function(){ var text=$(this).find("a").text(); var len=text.length; console.log(text); if(len>100){ text = text.substring(0,99)+"..."; } $(this).f... 阅读全文
posted @ 2016-08-08 16:25 dongxiaolei
摘要: 阅读全文
posted @ 2016-08-08 16:21 dongxiaolei
摘要:<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> <style> *{margin:0;padding:0;} div{margin:30px;} .top{display:none;posi 阅读全文
posted @ 2016-08-08 16:20 dongxiaolei
摘要:<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> <style> *{margin:0;padding:0;} input{vertical-align:middle} .container{ 阅读全文
posted @ 2016-08-08 16:18 dongxiaolei
摘要:<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> <style> *{margin:0;padding:0;list-style:none;} #div1{position:absolute; 阅读全文
posted @ 2016-08-08 16:16 dongxiaolei
摘要:var mobileAgent = new Array("iphone", "ipod", "ipad", "android", "mobile", "blackberry", "webos", "incognito", "webmate", "bada", "nokia", "lg", "ucwe 阅读全文
posted @ 2016-08-08 16:16 dongxiaolei
摘要:<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> <style> </style> </head> <body> <input id="file_upload" type="file" /> 阅读全文
posted @ 2016-08-08 16:12 dongxiaolei
摘要:*{margin:0;padding:0;} ul{list-style:none;margin-top:20px;} .wrap{width:600px;margin:20px auto;} .clearfix{zoom:1;} .clearfix:after{content:".";width: 阅读全文
posted @ 2016-08-08 16:10 dongxiaolei
摘要:<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> </head> <body> <div class="container"> <ul class="tab clearfix"> <li cl 阅读全文
posted @ 2016-08-08 16:08 dongxiaolei
摘要:*{margin:0;padding:0;} .tab_bg{display:none;width:100%;height:100%;background:#282829;z-index:99;position:absolute;} .tab_img{width:100px;height:100px 阅读全文
posted @ 2016-08-08 16:01 dongxiaolei
摘要:var timer; $("li").on("mouseover",function(){ clearTimeout(timer); timer=null; $(this).addClass("active"); $(this).siblings().removeClass("active"); v 阅读全文
posted @ 2016-08-08 15:55 dongxiaolei
摘要:本人前端菜鸟一个,闲来无事写了一个别踩白块的游戏练习代码编写能力,望大家多多指教。布局我采用的是动态添加一段内容,并随机分配给元素黑色或白色的class名称。然后重复内容,通过无缝滚动效果循环播放。 开始游戏之前需选择游戏等级,共分为三级(初级、中级、高级),游戏过程中您可进行暂停游戏、继续游戏、重 阅读全文
posted @ 2016-07-21 17:07 dongxiaolei
摘要:1)引入jquery 2)给a标签设置class smooth 3)$(".smooth").click(function(){ var href = $(this).attr("href"); var pos = $(href).offset().top; $("html,body").anima 阅读全文
posted @ 2016-07-18 17:31 dongxiaolei