随笔分类 - 日常小进步
摘要:() 小括号,匹配一段固定格式字符串 var reg1 = /(abc)/ 匹配abc reg1.test('abc') //true reg1.test('abcdf') //true reg1.test('a') //false []中括号,匹配字符组 var reg2=/[abc]/ 匹配包含
阅读全文
摘要:function test(){ this.list = {} }; test.prototype = { constructor:test, add:function(key,fn){ if(typeof this.list[key] == 'undefined'){//检测hello是否存在 t
阅读全文
摘要:尝鲜mask属性 本来想就着做一个催眠图 胃受不了,下面是半成品,留待有缘人。 <style> .box{ width: 200px; height: 200px; -webkit-mask-image: repeating-radial-gradient(rgba(0,0,0,0) 4px, rg
阅读全文
摘要:<canvas id="myCanvas" width="500" height="500" style="border:1px solid #c3c3c3;"> 您的浏览器不支持 HTML5 canvas 标签。 </canvas> <img id="scream" width="100" />
阅读全文

浙公网安备 33010602011771号