03 2017 档案

摘要:Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1, n] 阅读全文
posted @ 2017-03-30 15:08 123默小白 阅读(131) 评论(0) 推荐(0)
摘要:一、loading效果 二、clip-path css中的剪切clip-path属性是CSS Masking模块的一部分。 矩形 clip-path:inset(top right bottom left round top-raduis right-radius bottom-radius lef 阅读全文
posted @ 2017-03-29 16:48 123默小白 阅读(1122) 评论(0) 推荐(0)
摘要:1、处理折叠和展开的动画效果时候,使用transition(过渡效果),开始隐藏div时候使用了display:none; transition没有效果,因为视图中已经没有div的物理位置,重新block后,回流和渲染,而visbility:hidden还保留其物理位置,只需要渲染就可以,trans 阅读全文
posted @ 2017-03-28 15:42 123默小白 阅读(17782) 评论(0) 推荐(0)
摘要:RGB和HSL之间的转换 这个小东西主要用canvas 阅读全文
posted @ 2017-03-22 20:33 123默小白 阅读(333) 评论(0) 推荐(0)
摘要:Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpo 阅读全文
posted @ 2017-03-21 09:49 123默小白 阅读(168) 评论(0) 推荐(0)
摘要:绘制渐变背景图 第一种:大神的想法,摘抄 background-image: -webkit-linear-gradient(left, blue, red 25%, blue 50%, red 75%, blue 100%);使用CSS3的渐变绘制图像,从左到右。需要注意的是颜色是 0到49%的颜 阅读全文
posted @ 2017-03-12 20:08 123默小白 阅读(816) 评论(0) 推荐(0)
摘要:function sum(arr) { var len = arr.length; var sum = 0; if(len == 0){ sum = 0; }else{ for(var i = 0;i < len;i++){ sum += arr[i]; } } return sum;} funct 阅读全文
posted @ 2017-03-06 11:29 123默小白 阅读(306) 评论(0) 推荐(0)
摘要:label label标签有一个很好的作用就是扩大表单控件元素的点击区域。 一般有两种方法可以达到效果:(1)使用label标签包裹表单控件(2)设置label标签的for属性和表单的id属性一致 这意味着有三种方式可以实现 for和id可访问性好于label标签包裹 最好选用第一种方式 至于原因h 阅读全文
posted @ 2017-03-05 17:08 123默小白 阅读(3220) 评论(0) 推荐(0)