摘要: appendChild() var childNode = parentNode.appendChild(childNode); 该方法的参数是一个Node对象,返回值依然是该Node对象(参数中的childNode和返回值childNode指向同一个Node对象) html代码 <div id=" 阅读全文
posted @ 2020-11-04 13:38 JellyZ 阅读(2519) 评论(0) 推荐(0) 编辑
摘要: /* 显示一行,省略号 */ white-space: nowrap; text-overflow: ellipsis; overflow: hidden; word-break: break-all; /* 显示两行,省略号 */ text-overflow: -o-ellipsis-lastli 阅读全文
posted @ 2020-09-16 09:07 JellyZ 阅读(432) 评论(0) 推荐(0) 编辑
摘要: ```css.clearfix:after, .clearfix:before { content: " "; display: table;}.clearfix:after { clear: both;}.clearfix{zoom:1;/*为IE6,7的兼容性设置*/}``` 阅读全文
posted @ 2020-04-27 16:15 JellyZ 阅读(369) 评论(0) 推荐(0) 编辑
摘要: var getCoords = function(el){ var box = el.getBoundingClientRect(), doc = el.ownerDocument, body = doc.body, html = doc.documentElement, clientTop = h 阅读全文
posted @ 2020-04-26 09:45 JellyZ 阅读(311) 评论(0) 推荐(0) 编辑
摘要: var blob = new Blob(["hello,the world"], { type: 'text/plain' }); var objectUrl = URL.createObjectURL(blob); var a = document.createElement('a'); docu 阅读全文
posted @ 2020-04-20 13:35 JellyZ 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 滑动效果,第一时间能想的是transition,transform。话不多说,上代码 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device- 阅读全文
posted @ 2020-04-20 10:31 JellyZ 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 日历值班表(移动端),网上找了好多三方的控件, 页面样式,功能都不太满足条件! 索性自己写一个! 要求可以查看当月排班记录,可以切换月份,单击某天回调等。。。 效果图如下 可以确认的是一屏日历需要显示6个星期42天,(例如本月30天,上个月2天,下个月10天)。明白页面组成后,要计算出本月总天数,以 阅读全文
posted @ 2020-04-10 08:50 JellyZ 阅读(1056) 评论(0) 推荐(0) 编辑