上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 68 下一页
一般写函数,我们会这样调用:function add(x, y) { return x + y;}alert(add(2, 3));或者这样:var add = function(x, y) { return x + y;}alert(add(2, 3));匿名函数,使用()将匿名函数括... Read More
posted @ 2015-11-27 22:31 tinyphp Views(341) Comments(0) Diggs(0)
变量作用域:局部和全局局部变量优先级别高于同名的全局变量//声明一个全局变量var scope="global";function checkscope(){ //声明一个同名的局部变量 var scope="local"; //返回的是局部变量的值 return scope... Read More
posted @ 2015-11-27 21:06 tinyphp Views(290) Comments(0) Diggs(0)
目录:插件的安装卸载插件使用的基本流程拆分任务监听默认任务一、插件的安装卸载安装:npm install gulp-less --save-dev卸载npm uninstall gulp-less --save-dev二、插件使用的基本流程1.创建gulpfile.js2.创建package.jso... Read More
posted @ 2015-11-26 11:46 tinyphp Views(438) Comments(0) Diggs(0)
1.创建:gulpfile.jsvar gulp = require('gulp'), less = require('gulp-less'); gulp.task('default', function () { gulp.src('less/index.less') .... Read More
posted @ 2015-11-24 20:07 tinyphp Views(374) Comments(0) Diggs(0)
1.创建:gulpfile.js 2.创建package.json npm init 3.安装gulp到项目 npm install --save-dev gulp 4.安装插件到项目: npm install --save-dev gulp-autoprefixer 5.准备的src/app.cs Read More
posted @ 2015-11-24 12:52 tinyphp Views(6418) Comments(1) Diggs(0)
相比之下,无缝拼接能避免切换时出现空白,使用户体验更好!无缝滚动原理:制作一个双胞胎,内容跟主体内容一致,样式一致,如果横向排列则并排,当切换的时候,就可以弥补主体空白的地方,其他按普通循环操作即可。源码: demo ... Read More
posted @ 2015-11-22 18:53 tinyphp Views(1067) Comments(0) Diggs(0)
安装插件:npm install -g fis-parser-lessnpm install -g fis3-postpackager-loader配置:fis-conf.js使用fis-parser-less 插件进行解析,.less 文件后缀构建后被改成 .css 文件fis.match('*.... Read More
posted @ 2015-11-19 21:08 tinyphp Views(1548) Comments(0) Diggs(0)
设置规则的配置接口:fis.match(selector, props);1.添加md5戳:对 js、css、png 图片引用 URL 添加 md5 戳:fis.match('*.{js,css,png}', { useHash: true});2.js压缩:使用fis-optimizer-ugl... Read More
posted @ 2015-11-19 17:59 tinyphp Views(6609) Comments(0) Diggs(0)
FIS默认只会进行文件打包,不会对页面中的静态资源引用进行替换,这时可以利用fis-postpackager-simple插件进行资源替换。安装:npm install -g fis-postpackager-simple开启:// fis-conf.jsfis.config.set('module... Read More
posted @ 2015-11-19 15:13 tinyphp Views(492) Comments(0) Diggs(1)
fis3 的常用例子:https://github.com/fex-team/fis3-demogit链接可在页面中获取替换下面的git链接:例子准备:git clone https://github.com/hefangshi/fis-quickstart-demo.git启动本地服务器预览:fi... Read More
posted @ 2015-11-19 12:19 tinyphp Views(1108) Comments(0) Diggs(0)
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 68 下一页