标签:incr target iframe query jquer image width 一个 llb
在这里,请先看基础文章与相关技术文档:
npm init npm install requirejs --save npm install jquery@1.11.1 --save 创建基本目录: js/main.js&test.js css/index.css index.html build.js copy requirejs目录下的r.js到根目录 创建导出目录:one 测试目录创建完成!
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link rel="stylesheet" href="css/index.css"> </head> <body> <iframe class="iframe" src="http://baidu.com" frameborder="0" height="300"></iframe> <script type="text/javascript" defer anync="true" src="node_modules/requirejs/require.js" data-main="js/main"></script> </body> </html>
//参考配置目录 http://www.yfznw.com/node/22
({ dir:‘./one‘,//输出路径 paths:{ jquery:‘node_modules/jquery/dist/jquery.min‘, test:‘js/test‘, index:‘css/index.css‘ }, name: ‘js/main‘,// 模块入口 optimize: ‘none‘,//是否压缩 默认是压缩的,去掉不要就是压缩 })
require.config({ baseUrl:‘node_modules/‘, paths:{ ‘jquery‘:‘jquery/dist/jquery.min‘, ‘js‘:‘../js‘ } }); require([‘jquery‘,‘js/test‘],function($,test) { console.log($); test.one(); });
define([],function() { var testing = {}; testing.one = function() { console.log(‘module testing‘); }; return testing });
@charset "utf-8"; *::-webkit-scrollbar{width:2px;height:12px;} *::-webkit-scrollbar-button:start:decrement, ::-webkit-scrollbar-button:end:increment{width:0;height:0;} *::-webkit-scrollbar-button:vertical:increment{background:transparent;} *::-webkit-scrollbar-track-piece:vertical{background:#DFE7EF;} *::-webkit-scrollbar-track-piece:vertical:hover{background:#DFE7EF;} *::-webkit-scrollbar-track-piece:horizontal{background-color:transparent;} *::-webkit-scrollbar-thumb:vertical{height:100px;background:rgba(110,146,182,.5);} *::-webkit-scrollbar-thumb:vertical:hover{background:rgba(110,146,182,.4);} *::-webkit-scrollbar-thumb:horizontal{width:80px;height:10px;background-color:#ccc;}
//切换到根目录 执行:node r.js -o build.js
标签:incr target iframe query jquer image width 一个 llb
原文地址:http://www.cnblogs.com/q1104460935/p/7998335.html