![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
HTML、JavaScript
文章平均质量分 70
流光碎影儿
记录自己一点一滴学习的过程...
展开
-
使用jquery插件layer代替window.confirm方法
body .demo-class .layui-layer-title{background:#c00; display:none;color:#fff; border: none;}/*body .demo-class .layui-layer-btn{border-top:1px solid #E9E7E7}*//*body .demo-class .layui-layer-btn a原创 2016-01-12 09:57:47 · 2892 阅读 · 1 评论 -
CSS 的优先级机制
样式的优先级注:转载自http://www.cnblogs.com/xugang/archive/2010/09/24/1833760.html多重样式(Multiple Styles):如果外部样式、内部样式和内联样式同时应用于同一个元素,就是使多重样式的情况。一般情况下,优先级如下:(外部样式)External style sheet 有个转载 2016-01-15 10:07:14 · 303 阅读 · 0 评论 -
如何解决子div设置margin-top时影响父div的margin-top
测试代码如下:.container{width: 50%;margin: 0px auto;background-color: #919191;overflow:hidden;}/*.container{width: 50%;margin: 0px auto;background-color: #919191;position: absolute;}*//*.con原创 2016-05-11 16:40:46 · 740 阅读 · 0 评论 -
js的new运算符做了哪些事情
代码如下: function Person(name,age){this.name = name;this.age = age;this.sayName = function(){console.log(this.name);}}Person.prototype.sayAge = function() {console.log(this.age);};原创 2016-05-16 11:11:45 · 2696 阅读 · 0 评论 -
javascript Date转化为24小时格式
1、扩充Date的prototype,用于24小时格式化日期Date.prototype.format = function(format) {var date = {"M+": this.getMonth() + 1,"d+": this.getDate(),"h+": this.getHours(),"m+": this.getMinutes(),"s+": thi原创 2016-06-01 12:09:09 · 11630 阅读 · 0 评论 -
jQuery开发插件
1.jQuery.fn给我们提供了扩展开发的接口,原因就是在定义处使用原型链的方式,所以修改jQuery.fn实际上就是对jQuery.prototype的修改。jQuery.fn源码如下:jQuery.fn =jQuery.prototype = { jquery: version, constructor: jQuery, …原创 2016-06-07 17:00:56 · 324 阅读 · 0 评论