2018年1月4日
摘要: chrome://inspect/ 阅读全文
posted @ 2018-01-04 21:24 小碎步 阅读(306) 评论(0) 推荐(0) 编辑
摘要: //当img属性src没有值时,会有难看的边框和难看的一个小图 有什么办法去掉呢? <img src=" " /> //不要这样写 <img /> //这样写 然后,css如下 img:not([src]) { opacity: 0; } 可以去掉img的难看的边框和难看的一个小图 阅读全文
posted @ 2018-01-04 21:23 小碎步 阅读(6130) 评论(0) 推荐(0) 编辑
摘要: 重点:text-overflow: ellipsis;只对display:inline;起作用 例子: <span class="a">我说说<b class="b">打瞌睡党风建设打火机</b>说说色儿</span> a{ display:block/inline-block; width:100 阅读全文
posted @ 2018-01-04 21:18 小碎步 阅读(337514) 评论(1) 推荐(12) 编辑
摘要: //获取匹配的 function getUrlParam(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象 var r = window.location.search.subst 阅读全文
posted @ 2018-01-04 21:14 小碎步 阅读(748) 评论(0) 推荐(0) 编辑
摘要: //点击下载按钮点击统计 $(".btn").click(function(){ (new Image()).src = 'http://xxx.com/xxx.php?id=xxx_clickdown'; //只要修改src }); //访问统计 (修改) (new Image()).src = 阅读全文
posted @ 2018-01-04 21:12 小碎步 阅读(442) 评论(0) 推荐(0) 编辑
摘要: //html结构 //css .upImg { background-image: url(../images/01.png); position: fixed; background-repeat: no-repeat; background-position: center; background-size: cover; z-index: 11; widt... 阅读全文
posted @ 2018-01-04 21:03 小碎步 阅读(1765) 评论(0) 推荐(0) 编辑
摘要: 目的是:通过background的一系列属性,让DIV按照背景图片的比例缩放,并让背景图片填充整个DIV 首先我们需要让背景图片在指定的DIV中全部填充显示 之前看有用类似 background-attachment: 的fix来实现背景图片的填充,但是,貌似是不能按照当前的DIV大小去填充。 我的 阅读全文
posted @ 2018-01-04 21:01 小碎步 阅读(47189) 评论(0) 推荐(0) 编辑
摘要: //判断浏览器 var browser = { versions: function () { var u = navigator.userAgent, app = navigator.appVersion; return { //移动终端浏览器版本信息 mobile: !!u.match(/AppleWe... 阅读全文
posted @ 2018-01-04 21:00 小碎步 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 上面的代码片断工作正常,提示 “apple”, “orange” … 等,如预期一样。 问题: JSON 字符串 下面的例子中,声明了一个JSON字符串(随附单或双引号)直接地。 var json = '[{"id":"1","tagName":"apple"},{"id":"2","tagName 阅读全文
posted @ 2018-01-04 20:58 小碎步 阅读(287) 评论(0) 推荐(0) 编辑
摘要: (function($) { //生成一个block function createBlock(options) { var defaults = { type: "1", } var options = $.extend(defaults, options); //主元素 v... 阅读全文
posted @ 2018-01-04 20:55 小碎步 阅读(463) 评论(0) 推荐(0) 编辑