摘要: html: <body> <div class="outer-div"> <div class="inner-div"> ddddddd </div> </div> </body> css: 如下分不同情况的四种实现方式: 1.inner-div宽高不知,flex布局 .outer-div { di 阅读全文
posted @ 2018-07-24 22:53 大头小明 阅读(182) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2018-04-15 21:51 大头小明 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 1.下载webpack: 下载到全局: npm install webpack -g 下载到项目文件中: 如该项目没有package.json文件,则进入到该项目的目录,执行: npm init, npm install webpack --save-dev(似乎这个不执行也没有影响); 如项目中有 阅读全文
posted @ 2017-12-14 17:53 大头小明 阅读(788) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv=" 阅读全文
posted @ 2017-10-16 09:27 大头小明 阅读(196) 评论(0) 推荐(0) 编辑
摘要: <html> <head> </head> <body> <p>更改数组验证试试</p> </body> <script src='jquery-1.8.3.min.js'></script> <script> var arr = [true,false,true]; checkAllTrue(); 阅读全文
posted @ 2017-10-16 09:23 大头小明 阅读(953) 评论(0) 推荐(0) 编辑
摘要: <html> <head> <title>左右布局</title> <style> .left{ width:200px; height:100%; float:left; background-color: aquamarine; } .right{ width:calc(100% - 200px 阅读全文
posted @ 2017-10-16 09:12 大头小明 阅读(205) 评论(0) 推荐(0) 编辑
摘要: artTemplate是不能直接渲染数组的,如若想要使用模板渲染数组;应先将数组转为对象,再渲染; <body> <div id='content2'> </div> </body> //引入需求文件 <script src='jQuery-2.1.4.min.js'></script> <scri 阅读全文
posted @ 2017-08-23 14:50 大头小明 阅读(2471) 评论(1) 推荐(0) 编辑
摘要: 1.首先引入jQuery文件和template.js文件: <script src='jQuery-2.1.4.min.js'></script> <script src='template.js'></script> 2.渲染表格数据为json格式: var data1 = { headname: 阅读全文
posted @ 2017-08-23 12:14 大头小明 阅读(2156) 评论(0) 推荐(0) 编辑
摘要: hexo(https://hexo.io/)搭配github博客搭建,以及使用hexo主题(https://hexo.io/themes/); 1.安装nodejs(https://nodejs.org/en/)和git(https://git-scm.com/download/win)(针对win 阅读全文
posted @ 2017-08-13 17:38 大头小明 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 判断一个对象是否是空对象: var obj ={}; 1. if(JSON.stringify(newobj)=="{}"){ console.log('kongduixiang') }else{ console.log('hehe') } 2. if(Object.keys(newobj).len 阅读全文
posted @ 2017-08-06 23:28 大头小明 阅读(6446) 评论(0) 推荐(0) 编辑