bronya_zaychik

Results 43 comments of bronya_zaychik

部署的账号是多少。我部署了,不知道账号

这个问题解决了吗?我也遇到了这个问题

```js var input = document.querySelector("#input"); var li = document.querySelectorAll("li"); var index = -1; [].slice.call(li).forEach(function (el,i) { el.addEventListener("click",function () { var selected = document.querySelector(".selected"); selected && selected.classList.remove("selected"); this.classList.add("selected"); input.value = this.textContent;...

```javascript let arr = [0,1,2,3,4,5]; let fn = { // 指定任意索引,对应数组项往前移动一个位置 forwardToOne(arr,index){ arr[index] = arr.splice(index-1,1,arr[index])[0]; return arr; }, //指定任意索引,对应数组项移动到最前面 moveToFirst(arr,index){ arr.unshift(arr.splice(index, 1)[0]); return arr; }, //指定任意索引,对应数组项移动到最后面 moveToLast(arr,index){ arr.push(arr.splice(index, 1)[0]); return...

```js function formatNumber(num) { var result = ''; while (num.length > 3) { result = ',' + num.slice(-3) + result; num = num.slice(0, num.length - 3); } if (num) {...

css有点菜,中规中矩的实现。 [地址](https://jsbin.com/palacexacu/edit?html,output) ```css /*zxx: 实现不错哟~*/ body { font-size: 16px; } .step { position: relative; display: inline-block; line-height: 3rem; padding: 0 1.5rem; margin-left: 1.5rem; color: #57bdf0; background: #edf9ff; } .step::before {...

1. 兼容IE8,两栏自适应布局首选float。[在线地址](https://jsbin.com/nupawoyupo/1/edit?html,output) ```css ul { padding: 0; list-style: none; } .article-content { font-size: 16px; } .article-item { overflow: hidden; height: 2.5em; line-height: 2.5em; } .article-title { overflow: hidden; text-overflow: ellipsis;...

[demo](https://jsbin.com/bakopawega/edit?html,output) 看到这道题想到了张老师的一篇文章,以前看张老师写过关于纯css交互效果 [借助HTML5 details,summary无JS实现各种交互效果](https://www.zhangxinxu.com/wordpress/2018/01/html5-details-summary-no-js-ux/) ```css ul, li { margin: 0; padding: 0; } ul { list-style: none; } summary{ user-select: none; outline: 0; } summary a { text-decoration: none; color:...

```js //第一题 var str1 = str.replace(/fill="([^"]+)"/gi,function (match,p) { return p === "none" ? match : ''; }); ``` - 这里可以参看张老师之前写的一篇文章[原来浏览器原生支持JS Base64编码解码](https://www.zhangxinxu.com/wordpress/2018/08/js-base64-atob-btoa-encode-decode/) - mdn官方文档[window.btoa](https://developer.mozilla.org/zh-CN/docs/Web/API/WindowBase64/btoa) ```js //第二题 var str2 = window.btoa(str1); ```...

1. 1 2. 2 3. 0.04 4. 0.05 ```js Number.prototype.toFixed = String.prototype.toFixed = function (number) { if(isNaN(number)) return; return parseInt(this * Math.pow(10, number) + 0.5) / Math.pow(10, number); } ```...