摘要: tr td:nth-child(2){ background-color:gray;}就是tr当中的td的第二个td的属性tr:nth-child(2n+0){ background-color:#F0F0F0;}这个是tr的2的倍数的使用公式 (an+b)。描述:表示周期的长度,n 是... 阅读全文
posted @ 2015-09-23 16:17 西瓜霜 阅读(9393) 评论(0) 推荐(0) 编辑
摘要: mb_strlen("你好123",'utf-8');//返回5strlen("你好");//返回几我也不知道,肯定不是2,但你想要2就用上面的substr("你好啊",0,1);//返回的是乱码因为你取了一个汉字的一部分mb_substr("你好啊",0,1,"utf-8");//返回 '你'第一... 阅读全文
posted @ 2015-09-23 15:03 西瓜霜 阅读(5550) 评论(0) 推荐(1) 编辑
摘要: PHP 提供了函数可以方便的将各种形式的日期转换为时间戳,该类函数主要是:strtotime():将任何英文文本的日期时间描述解析为时间戳。mktime():从日期取得时间戳。strtotime()strtotime() 函数用于将英文文本字符串表示的日期转换为时间戳,为 date() 的反函数,成... 阅读全文
posted @ 2015-09-23 10:34 西瓜霜 阅读(40232) 评论(0) 推荐(0) 编辑