Node.js 學(xué)習(xí)(三)——Node.js 使用 Bootstrap
Node.js學(xué)習(xí)(三)——Node.js使用Bootstrap
下載bootstrap
npm install bootstrap
下載jquery
npm install jquery
配置使用
文件放置
在node_modules目錄中找到j(luò)query和bootstrap
將jquery和bootstrap的js文件拷貝到項(xiàng)目目錄下pubic的javascripts下
將bootstrap的dist目錄下的css目錄下的文件拷貝到項(xiàng)目目錄下的public的stylesheets目錄下
配置使用
因?yàn)橛玫氖莈js模板引擎,所以使用方式和html一樣,將index.ejs改為如下代碼
<%= title %>
我是主頁(yè)
效果
學(xué)習(xí)資料
bootstrap教程:http://www.runoob.com/bootstrap/bootstrap-tutorial.html
jquery在線api:http://hemin.cn/jq/
評(píng)論
圖片
表情
