timesheetjs

html文件如何引用css格式?

资源

第一次尝试

  • 安装bower
  • 命令行$ npm install -g bower
  • 返回/usr/local/bin/bower -> /usr/local/lib/node_modules/bower/bin/bower /usr/local/lib └── bower@1.8.4
  • 命令行bower install https://github.com/sbstjn/timesheet.js.git
  • 返回timesheet.js#1354b05750 bower_components/timesheet.js
  • HOW TO将js和css代码嵌入html文件

第二次尝试

  • 问题
    • 自己编辑的html文件无法引入css格式
    • 在浏览器打开html文件后,无法显示timesheet.js格式
  • 步骤
    • 在同一目录(/Users/zsy/Documents/timesheet.js/bower_components/timesheet.js/)下重新安装timesheet.js和编写html文件
    • html文件如下

Copy Code

<div id="timesheet">
<!DOCTYPE html>
<html>
<head>
  <title>123</title>
  <link rel="/Users/zsy/Documents/timesheet.js/bower_components/timesheet.js/dist/timesheet.min" type="text/css" href="/Users/zsy/Documents/timesheet.js/bower_components/timesheet.js/dist/timesheet.min.css">
</head>
<body>
new Timesheet('timesheet', 2002, 2013, [
  ['2002', '09/2002', 'A freaking awesome time', 'lorem'],
  ['06/2002', '09/2003', 'Some great memories', 'ipsum'],
  ['2003', 'Had very bad luck'],
  ['10/2003', '2006', 'At least had fun', 'dolor'],
  ['02/2005', '05/2006', 'Enjoyed those times as well', 'ipsum'],
  ['07/2005', '09/2005', 'Bad luck again', 'default'],
  ['10/2005', '2008', 'For a long time nothing happened', 'dolor'],
  ['01/2008', '05/2009', 'LOST Season #4', 'lorem'],
  ['01/2009', '05/2009', 'LOST Season #4', 'lorem'],
  ['02/2010', '05/2010', 'LOST Season #5', 'lorem'],
]);
</body>
</html>
</div>

changelog

2018年06月21日11:05:28 第二次尝试
2018年06月14日11:05:28 第二次尝试

^