skinner

Results 15 comments of skinner

按照你上面的修改是能正常运行,可是在模拟器上一直卡在初始界面上~~

+1,我的是在ios模拟器上卡在启动界面

```js 1. 4 2. arr.splice(2,1) 3. [1,2,0,3] 4. let arr3 = arr.concat(arr2) //zxx: let IE不支持 5. let arr3 = [...new Set(arr3)] ```

## 源代码 ```js class RandomCenter { // 增加userId set(userid) { const storage = localStorage.getItem(userid); if (!storage) { let skinList = this.shuffle(); console.log(skinList); localStorage.setItem(userid, JSON.stringify(skinList)); } else { console.log("请通过get直接获取随机皮肤"); } }...

### 第1题 ```js document.cookie ``` ### 第2题 ```js document.cookie = "userid=1" ``` ### 第3题 ```js let expireDate = new Date(time + 24*60*60*1000); document.cookie="userid=1; expires="+expireDate.toUTCString(); ``` ### 第4题 ```js function getCookie(name) ...

[JSBIN](https://jsbin.com/biyajiy/4/edit?html,css,output) .button1{ text-align:center; line-height:100px; border:1px solid transparent; position:relative; background-clip: padding-box; background:#fff; } .button1:after{ position:absolute; content:''; background:linear-gradient(deepskyblue, deeppink); top:-10px; left:-10px; right:-10px; bottom:-10px; border-radius: 10px; z-index:-1; } .button2{ overflow:hidden; border-radius:10px; } .button2...

> @ziven27 > `margin`当单位是`%`的时候是相对于包含快的宽度来进行计算的,也就是说 > > ```css > .nav-in{ > margin-top: -50%; /* 不理解为啥后面元素不跟随 */ > } > ``` > > 里面的`margin-top`实际是按照`.nav`的宽度来进行计算的。 > > 又因为`.nav`使用了`writing-mode: vertical-lr;`属性,所以实际值是按照`.nav`的高度来进行计算的。而`.nav`的高度是被`.nav-in`撑开的,所以`.nav`是有一个高度值的,这个值就是`.nav-in`的高度。 > > 最终即使`.nav-in`因为`margin-top`上移了,之后的其他文案也没有跟随,因为`.nav`已经有了一个高度占位了。 >...

1. `styleSheets` 2. `head` `textContent` 3. `div:nth-of-type(1)` 4. `div:nth-child(3)` 5. 3 6. `:nth-last-of-type(2) div div` 7. `div[class~='page']` 8. `div:not([class])`

[demo](https://jsbin.com/cememayame/edit?html,css,js,output) ```js // 第一题 let docFrag = document.createDocumentFragment(); for(let i = 0 ; i< 20 ; i++){ let ele = document.createElement('div','box'); ele.textContent = i; ele.className = 'box'; docFrag.appendChild(ele) } document.body.append(docFrag);...

[Demo预览](https://codesandbox.io/s/92wx58jmkp) ***听完讲解之后修正:*** ```js (function() { // 题一 let body = document.body; let $slider = document.createElement("div"); $slider.setAttribute("class", "slider"); let $ele_1 = document.createElement("button"); $ele_1.setAttribute("class", "slider-track"); let $ele_2 = document.createElement("button"); $ele_2.setAttribute("class", "slider-thumb"); body.appendChild($slider);...