摘要: python 处理数组用的pop(index) js中用的是splice()方法;特殊:python 数组可以用arr[-1]、arr[-2]分别获取数组的倒数第一、倒数第二项,而js没有该方法; python 数组有list 和 tuple 2种,tuple为不可更改数组,list有 insert 阅读全文
posted @ 2018-12-21 15:13 红苹果学园 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 对于操作数组的情况下我们应该先拷贝一份 .concat() 阅读全文
posted @ 2018-11-14 18:02 红苹果学园 阅读(2722) 评论(0) 推荐(0) 编辑
摘要: getCookie(name) { var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)"); if(arr=document.cookie.match(reg)){ return unescape(arr[2]); } else { return n 阅读全文
posted @ 2018-11-06 21:00 红苹果学园 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 参考博客:http://www.css88.com/demo/canvas_retina/index.html 模糊的文字: 获取像素比之后清晰的文字: <canvas id="my_canvas" width="540" heihgt="180"></canvas> <script type="t 阅读全文
posted @ 2018-11-05 10:53 红苹果学园 阅读(695) 评论(0) 推荐(0) 编辑
摘要: $(document).on("click",".动态添加的dom",function(){ console.log("11") }) //在ios里这里动态添加的dom点击事件不会触发,解决办法:给触发点击事件动态添加的dom增加样式,cursor:pointer |||||| 或者增加一个tou 阅读全文
posted @ 2018-08-17 10:44 红苹果学园 阅读(9555) 评论(0) 推荐(0) 编辑
摘要: 我项目里1rem=100px 对应的媒体查询的样式html,body{ margin:0;padding:0;font-size:0.14rem; }@media (min-width: 320px){html{font-size: 85.3334px;} }@media (min-width: 3 阅读全文
posted @ 2018-08-14 17:34 红苹果学园 阅读(709) 评论(0) 推荐(0) 编辑
摘要: 谷歌浏览器的默认保存表单信息之后自动填写的bug, 其原理是根据第一个type=‘password’的input框自动填充,如下图 第三个框是 password框,则2,3项会自动填充保存的登录的用户名和密码,如果第四项是第一个type=‘password’的密码框则第三四项自动填写。解决办法就是 阅读全文
posted @ 2018-08-09 17:39 红苹果学园 阅读(1397) 评论(0) 推荐(0) 编辑
摘要: var maxShowSeconds=3600000 _self.state.totalSeconds.forEach((item,index)=>{ var timer='timer'+index _self.state.timer.push(timer) _self.setState({ tim 阅读全文
posted @ 2018-07-20 10:17 红苹果学园 阅读(784) 评论(0) 推荐(0) 编辑
摘要: legend.name 与 series.name 设置不一致所导致另外要引入legend模块,按需引入相关模块 // 引入 ECharts 主模块 import echarts from 'echarts/lib/echarts'; // 引入柱状图 import 'echarts/lib/cha 阅读全文
posted @ 2018-07-09 15:32 红苹果学园 阅读(10144) 评论(0) 推荐(0) 编辑
摘要: 大致思路给伪类做成小三角之后旋转45度 给伪类加阴影: .detail_container::after{ width: 0; height: 0; border-style: solid; border-width: 5px; border-color: #fff #fff transparent 阅读全文
posted @ 2018-06-05 21:15 红苹果学园 阅读(198) 评论(0) 推荐(0) 编辑