随笔分类 - JavaScript
摘要:body{margin: 0; height: 100vh; width: 100vw; display: flex; align-items: center; justify-content: center; background: rgba(44,91,110,1);} .container{width: 75px; height: 32px; background: rgb...
阅读全文
摘要:js转json : stringify();json(键值要双引号)转js : parse() stringify两个参数,第一个数组/函数,用于过滤结果。第二个是否在json字符串中保留缩进 ps:如不需要缩进不缩进即可,如果不需过滤结果又要缩进,则过滤参数null。如采用函数可进行复杂过滤 ps
阅读全文
摘要:http://wow.techbrood.com/fiddle/1804
阅读全文
摘要:http://www.gamersky.com/news/201706/920789.shtml
阅读全文
摘要:*{margin:0;padding:0;box-sizing: border-box;background:#e5e5e5;} body,html{text-align: center;font-family: 'Oxygen Mono', monospace;color: #999;} h1{text-transform: uppercase;letter-spacing: 1pt;f...
阅读全文
摘要:滚动内层列表时,速度过快,会导致外层也滚动,影响用户体验 解决办法 一 :鼠标内层时,禁用外层滚动条 解决办法 二:鼠标滚动到顶部/底部时,再出发外层滚动条
阅读全文
摘要:var NewsTime = 2000; //每条新闻的停留时间 var TextTime = 50; //新闻标题文字出现等待时间,越小越快 var newsi = 0; var txti = 0; var txttimer; var newstimer; var newstitle = new Array(); //新闻标题 ...
阅读全文
摘要:(function () { var o=document.getElementById('hutia'); var s=o.innerHTML; var p=document.createElement('span'); var n=document.createElement('a'); p.innerHTML...
阅读全文
摘要:var currentpos,timer; function initialize(){ timer=setInterval ("scrollwindow ()",30); } function sc(){ clearInterval(timer); } function scrollwindow(){ currentpos=docu...
阅读全文
摘要:body{background: #222226;} .select-hidden {display: none;visibility: hidden;padding-right: 10px;} .select {cursor: pointer;display: inline-block;position: relative;font-size: 16px;color: #fff;widt...
阅读全文
摘要:$(function () { const sliderData=[ { img:"../images/1.jpg", name:"", desc:"Earth's mightiest heroes must come together and learn to fight as a team if ...
阅读全文
摘要:worker.js 【know】css:vw, js: new Worker() 【explain】 vw_相对于视口的宽度。视口被均匀分为100单位的vw h1{font-size:8vw} 如果视口宽度视200mm,h1字号为16mm,即(8*200)/100 new Worker_可以在后台执
阅读全文

浙公网安备 33010602011771号