2018年12月20日

摘要: 严格模式 只需要在代码首部加入字符串“use strict”, 必须在首部,首部是指其前面没有任何有效的js代码注释,否则无效。 eg: "use strict"; function(){ console.log(a) ; } 注意事项: 1.不适用var声明变量,严格模式中奖通不过;在循环中如果没 阅读全文
posted @ 2018-12-20 17:46 namehou 阅读(343) 评论(0) 推荐(0)
 
摘要: const var let区别 1.const 定义的变量不可以修改,而且必须初始化 2.var 定义的变量可以修改,如果不初始化会输出undefine 3.let是块级作用域,函数内部使用let定义后,对外部函数无影响 阅读全文
posted @ 2018-12-20 17:15 namehou 阅读(552) 评论(0) 推荐(0)
 
摘要: #box1{ width: 200px;height: 200px;border: 1px solid #333; } #box2{ width: 100px;height: 100px;margin: 50px;border: 1px solid #333; } #span{ width: 50p 阅读全文
posted @ 2018-12-20 16:42 namehou 阅读(164) 评论(0) 推荐(0)
 
摘要: *{ padding: 0;margin: 0; } .all{ width: 100%;overflow: hidden; } ul li{ list-style: none; } .box{ width: 400px;height: 30px;background: blue;color: #f 阅读全文
posted @ 2018-12-20 16:41 namehou 阅读(114) 评论(0) 推荐(0)
 
摘要: *{ padding: 0;margin: 0; } ul,ol{ list-style: none; } .rili{ width: 240px;height: 300px;margin: 50px auto;border: 1px solid #... 阅读全文
posted @ 2018-12-20 16:41 namehou 阅读(131) 评论(0) 推荐(0)
 
摘要: #box{position: relative; width: 200px; height: 50px; border: 1px solid #eee; margin: 50px auto 0;} #bg{height: 10px; margin-top: 19px; border: 1px sol 阅读全文
posted @ 2018-12-20 16:39 namehou 阅读(320) 评论(0) 推荐(0)