小崔带你飞 ~

记录学习的技能和遇到的问题


  • 首页

  • 关于

  • 标签

  • 分类

  • 归档

  • 搜索

tableView setion cell加边框圆角

发表于 2017-10-12 | 阅读次数: ℃
字数统计: 1,458 | 阅读时长 ≈ 7

###最近项目UI需求tableViewCell 带圆角边框,自己写了下像平常那样去设置圆角边框行不通网上差了一下自己又改进一下,废话不多说先看图在撸代码。
图片效果如下:

阅读全文 »

iOS自动查找项目中不用的图片资源

发表于 2017-10-12 | 分类于 iOS | 阅读次数: ℃
字数统计: 159 | 阅读时长 ≈ 1

####项目上线资源包比较大,要做瘦身,首先想到是删除项目中不用的图片资源,去github上搜索了比较好用的项目资源,比较好用分享给大家,简单好用

阅读全文 »

Hello World

发表于 2017-10-11 | 阅读次数: ℃
字数统计: 78 | 阅读时长 ≈ 1

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

js常用的代码片段

发表于 2017-06-28 | 阅读次数: ℃
字数统计: 223 | 阅读时长 ≈ 1

自定义循环函数

1
2
3
4
5
6
7
8
9
10
11
12
13
14
const ff = function () {
var arry = [];
(function iterator(i) {
if(i==4){
console.log("结束了");
console.log(arry);
return;
};
arry.push(i);
iterator(i+1);
})(0)
};
ff();

title 样式的改变

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
var oldTitle = null;
$(document).bind('mouseover mouseout mousemove',function(event){
var left = event.pageX , top = event.pageY;
var ele = event.target;
var title = ele.title;
var type = event.originalEvent.type;
if(type == 'mouseover'){
oldTitle = title;
ele.title = '';
//if(title && title.length > 0){
if(title != null){
var showEle = $('<div></div>',{text:title,class:'showTitleBox'}).css({
position:'absolute',
top:top+10,
left:left,
border:'1px solid #CCC',
borderRadius:'5px',
background:"infobackground",
fontFamily:'SimHei'
})
showEle.appendTo('body');
}
}else if(type == 'mouseout'){
ele.title = oldTitle;
$('.showTitleBox').remove();
}else if(type == 'mousemove'){
$('.showTitleBox').css({
top:top+10,
left:left
})
}
})

时间戳

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
function add0(m) {
return m < 10 ? '0' + m : m
};
//时间戳
function getLocalTime(nS) {
// return new Date(parseInt(nS) * 1000).toLocaleString().replace(/:\d{1,2}$/,' ');
// return new Date(parseInt(nS) * 1000).toLocaleString().replace(/年|月/g, "-").replace(/日/g, " ");
var ti = new Date(parseInt(nS) * 1000);
var y = ti.getFullYear();
var m = ti.getMonth() + 1;
var d = ti.getDate();
var h = ti.getHours();
var mm = ti.getMinutes();
var s = ti.getSeconds();
return y + '-' + add0(m) + '-' + add0(d) //+ ' ' + add0(h) + ':' + add0(mm);
}
12
cuijian

cuijian

生命不息,折腾不止

14 日志
1 分类
5 标签
RSS
GitHub E-Mail
友情链接
  • Web前端导航
  • 前端书籍资料
  • 百度前端技术学院
  • google前端开发基础
© 2018 cuijian | Site words total count: 13.7k
博客全站共13.7k字
本站访客数 人次 本站总访问量 次