整合營銷服務商

          電腦端+手機端+微信端=數據同步管理

          免費咨詢熱線:

          如何在 Html5 中使用數學公式

          HTML5中,可以使用MathML(Mathematical Markup Language)來顯示數學公式。MathML是一種XML語言,它允許在HTML文檔中嵌入數學公式。以下是一個簡單的例子:

          
          <!DOCTYPE html>
          <html>
          <head>
          	<title>MathML Example</title>
          </head>
          <body>
          	<p>展示簡單的數學公式:</p>
          	<math>
          		<mrow>
          			<mi>x</mi>
          			<mo>+</mo>
          			<mi>y</mi>
          			<mo>=</mo>
          			<mi>z</mi>
          		</mrow>
          	</math>
          </body>
          </html>
          

          網頁展示效果如下

          展示簡單的數學公式:

          x+y=z

          在上面的例子中,使用`<math>`標簽來包含數學公式,使用`<mrow>`標簽來定義公式的行,使用`<mi>`標簽來定義變量,使用`<mo>`標簽來定義運算符。可以根據需要添加其他標簽和屬性來創建更復雜的數學公式。

          除了MathML之外,還可使用JavaScript庫(例如MathJax)來在HTML5中顯示數學公式。這些庫允許使用LaTeX語法(LaTeX 常用語法匯總 - 知乎)來編寫數學公式,并將其轉換為HTML格式。這種方法更加靈活和易于使用,但需要加載額外的JavaScript文件。

          希望這可以以此為開始,在HTML5中學習使用數學公式。

          avaScript 資源大全內容包括:包管理器、加載器、測試框架、運行器、QA、MVC框架和庫、模板引擎、數據可視化、時間軸、編輯器等等


          包管理器


          管理著 JavaScript 庫,并提供讀取和打包它們的工具。

          • Yarn: Yarn 是由 Facebook、Google、Exponent 和 Tilde 聯合推出了一個新的 JS 包管理工具 https://yarnpkg.com/lang/en/
          • npm:npm 是 JavaScript 的包管理器。https://www.npmjs.com/
          • Bower:一個 web 應用的包管理器。https://github.com/bower/bower
          • component:能構建更好 web 應用的客戶端包管理器。https://github.com/componentjs/component
          • spm:全新的靜態包管理器。https://github.com/spmjs/spm
          • jam:一個專注于瀏覽器端和兼容 RequireJS 的包管理器。https://github.com/caolan/jam
          • jspm:流暢的瀏覽器包管理器。https://github.com/jspm/jspm-cli
          • Ender:沒有庫文件的程序庫。https://github.com/ender-js/Ender
          • volo:以項目模板、添加依賴項與自動化生成的方式創建前端項目。https://github.com/volojs/volo)
          • Duo:一個整合 Component、Browserify 和 Go https://github.com/duojs/duo)的最佳思想,使開發者能快速方便地組織和編寫前端代碼的下一代包管理器。


          加載器


          JavaScript 的模塊或加載系統。

          • RequireJS:JavaScript 文件和模塊的加載器。https://github.com/jrburke/requirejs
          • browserify:在瀏覽器端以 node.js 的方式 require()。https://github.com/substack/node-browserify
          • SeaJS:用于 Web 的模塊加載器。https://github.com/seajs/seajs
          • HeadJS:HEAD 的唯一腳本。https://github.com/headjs/headjs
          • curl:小巧、快速且易擴展的模塊加載器,它能處理 AMD、CommonJS Modules/1.1、CSS、HTML/text 和歷史腳本。https://github.com/cujojs/curl
          • lazyload:小巧且無依賴的異步 JavaScript 和 CSS 加載器。https://github.com/rgrove/lazyload/
          • script.js:異步 JavaScript 加載器和依賴管理器。https://github.com/ded/script.js
          • systemjs:AMD、CJS(commonJS) 和符合 ES6 規范的模塊加載器。https://github.com/systemjs/systemjs
          • LodJS:基于 AMD 的模塊加載器。https://github.com/yanhaijing/lodjs
          • ESL:瀏覽器端的模塊加載器,支持延遲定義和 AMD。https://github.com/ecomfe/esl
          • modulejs:輕量的 JavaScript 模塊系統。https://github.com/lrsjng/modulejs


          打包工具


          • browserify :Browserify 讓你能在瀏覽器端使用 require('modules') ,打包所有依賴。https://github.com/substack/node-browserify
          • webpack:為瀏覽器打包 CommonJs/AMD 模塊。https://github.com/webpack/webpack
          • gulp:用自動化構建工具增強你的工作流程!http://gulpjs.com/
          • rollup: JavaScript 模塊打包器! https://rollupjs.org/) [中文](http://www.rollupjs.com/


          測試框架


          框架

          • mocha:適用于 node.js 和瀏覽器、簡易、靈活、有趣的 JavaScript 測試框架。https://github.com/mochajs/mocha
          • jasmine:簡單無 DOM 的 JavaScript 測試框架。https://github.com/jasmine/jasmine
          • qunit:一個易于使用的 JavaScript 單元測試框架。https://github.com/jquery/qunit
          • jest:簡單的 JavaScript 單元測試框架。https://github.com/facebook/jest
          • prova:基于 Tape 和 Browserify 的測試運行器,它適用于 Node & 瀏覽器。https://github.com/azer/prova
          • DalekJS:自動化且跨瀏覽器的 JavaScript 功能測試框架。https://github.com/dalekjs/dalek

          斷言

          • chai:適用于 node.js 和瀏覽器的 BDD / TDD 斷言框架,并能搭配其它測試框架使用。https://github.com/chaijs/chai
          • Sinon.JS:對 JavaScript 進行 spies、stubs 和 mock 測試。https://github.com/sinonjs/sinon
          • expect.js:簡約的、適用于 Node.js 和瀏覽器端的 BDD 式斷言工具。https://github.com/Automattic/expect.js
          • should.js:適用于 Node.js 的 BDD 式斷言工具。https://github.com/tj/should.js

          覆蓋率

          • istanbul:另一個 JS 代碼覆蓋率檢測工具。https://github.com/gotwarlost/istanbul
          • blanket:一個簡單的代碼覆蓋率檢測庫。它的設計理念是易于安裝和使用,且可用于瀏覽器端和 node.js。https://github.com/alex-seville/blanket
          • JSCover:JSCover 是一個檢測 JavaScript 程序代碼覆蓋率的工具。https://github.com/tntim96/JSCover

          運行器

          • phantomjs:腳本化的 Headless WebKit。https://github.com/ariya/phantomjs
          • slimerjs:一個內核為 Gecko 的類似 PhantomJS 工具。https://github.com/laurentj/slimerjs
          • casperjs:基于 PhantomJS 和 Slimer JS 的導航腳本和測試工具。https://github.com/n1k0/casperjs)
          • zombie:基于 node.js 、快速、全棧且無圖形界面的瀏覽器的測試工具。https://github.com/assaf/zombie
          • totoro:一個簡單可靠且能跨瀏覽器運行的測試工具。https://github.com/totorojs/totoro
          • karma:一個優秀的的 JavaScript 測試運行器。https://github.com/karma-runner/karma
          • nightwatch:基于 node.js 和 selenium webdriver 的圖形界面自動化測試框架。https://github.com/nightwatchjs/nightwatch
          • intern:下一代 JavaScript 代碼測試棧。https://github.com/theintern/intern
          • yolpo:在瀏覽器逐句執行的 JavaScript 解釋器。http://www.yolpo.com/


          QA 工具


          • JSHint:JSHint 是一個有助于發現 JavaScript 代碼錯誤和潛在問題的工具。https://github.com/jshint/jshint/
          • jscs:JavaScript 代碼風格檢測工具。https://github.com/jscs-dev/node-jscs
          • jsfmt:格式化、搜索和改寫 JavaScript。https://github.com/rdio/jsfmt
          • jsinspect:檢測復制粘貼和結構類似的代碼。https://github.com/danielstjules/jsinspect
          • buddy.js:發現 JavaScript 代碼里的 魔術數字。https://github.com/danielstjules/buddy.js
          • ESLint:完全插件化的工具,能在 JavaScript 中識別和記錄模式。https://github.com/eslint/eslint
          • JSLint :高標準、嚴格和固執的代碼質量工具,旨在只保持語言的優良部分。https://github.com/douglascrockford/JSLint


          MVC 框架和庫


          • angular.js:為網絡應用增強 HTML。https://github.com/angular/angular.js
          • aurelia:一個適用于移動設備、桌面電腦和 web 的客戶端 JavaScript 框架。http://aurelia.io/
          • backbone:給你的 JS 應用加入帶有 Models、Views、Collections 和 Events 的 Backbone。https://github.com/jashkenas/backbone
          • batman.js:最適合 Rails 開發者的 JavaScript 框架。http://batmanjs.org/
          • ember.js:一個旨在創建非凡 web 應用的 JavaScript 框架。https://github.com/emberjs/ember.js
          • meteor:一個超簡單的、數據庫無處不在的、只傳輸數據的純 JavaScript web 框架。https://github.com/meteor/meteor
          • ractive:新一代 DOM 操作。https://github.com/ractivejs/ractive
          • vue:一個用于構建可交互界面的、直觀快速和可組合的 MVVM 框架。https://github.com/vuejs/vue)
          • knockout:Knockout 用 JavaScript 讓創建響應式的富 UI 更加容易。https://github.com/knockout/knockout)
          • spine:構建 JavaScript 應用的輕量 MVC 庫。https://github.com/spine/spine
          • espresso.js:一個極小的、用于制作用戶界面的 JavaScript 庫。https://github.com/techlayer/espresso.js
          • canjs:讓 JS 更好、更快、更簡單。https://github.com/canjs/canjs
          • react:用于建構用戶界面的庫。它是聲明式的、高效的和極度靈活的,并使用虛擬 DOM 作為其不同的實現。https://facebook.github.io/react/
          • react-native:一個用 React 構建原生應用的框架。https://github.com/facebook/react-native
          • riot:類 React 庫,但很輕量。https://github.com/riot/riot
          • thorax:加強你的 Backbone。https://github.com/walmartlabs/thorax
          • chaplin:使用 Backbone.js 庫的 JavaScript 應用架構。https://github.com/chaplinjs/chaplin
          • marionette:一個 Backbone.js 的復合應用程序庫,旨在簡化大型 JavaScript 應用結構。https://github.com/marionettejs/backbone.marionette
          • ripple:一個小巧的、用于構建響應界面的基礎框架。https://github.com/ripplejs/ripple
          • rivets:輕量卻擁有強大的數據綁定和模板解決方案 https://github.com/mikeric/rivets
          • derby:讓編寫實時和協同應用更簡單的 MVC 框架,能夠在 Node.js 和瀏覽器同時運行。https://github.com/derbyjs/derby
            • derby-awesome:很棒的 derby 組件集合。https://github.com/russll/awesome-derby
          • way.js:簡單、輕量、持久化的雙向數據綁定。https://github.com/gwendall/way.js
          • mithril.js:Mithril 是一個客戶端 MVC 框架(輕量、強大和快速) https://github.com/lhorie/mithril.js
          • jsblocks:jsblocks 是一個更好的 MV-ish 框架。https://github.com/astoilkov/jsblocks
          • LiquidLava:易懂的、用于構建用戶界面的 MVC 框架。http://www.lava-framework.com/
          • Electron:用Html、CSS和JavaScript構建跨平臺的客戶端應用程序。http://electron.atom.io/)、[GitHub](https://github.com/electron/electron


          基于 Node 的 CMS 框架


          • KeystoneJS:強大的 CMS 和 web 應用框架。https://github.com/keystonejs/keystone
          • Reaction Commerce:擁有實時的架構和設計的響應式(reactive) CMS。https://github.com/reactioncommerce/reaction
          • Ghost:簡單、強大的發布平臺。https://github.com/tryghost/Ghost
          • Apostrophe:提供內容編輯和基本服務的 CMS。https://github.com/punkave/apostrophe
          • We.js:適用于實時應用、網站或博客的框架。https://github.com/wejs/we/
          • Hatch.js:擁有社交特性的 CMS 平臺。https://github.com/inventures/hatchjs
          • TaracotJS:擁有快速、極簡風格特點且基于Node.js 的 CMS。https://github.com/xtremespb/taracotjs-generator/
          • Nodizecms:為 CoffeeScript 愛好者準備的 CMS。https://github.com/nodize/nodizecms
          • Cody:擁有所見即所得的編輯器的 CMS。https://github.com/jcoppieters/cody
          • PencilBlue:CMS 和博客平臺。https://github.com/pencilblue/pencilblue/


          模板引擎


          模板引擎允許您執行字符串插值。

          • mustache.js:是 JavaScript 中帶有 {{mustaches}} 的最簡模板。https://github.com/janl/mustache.js
          • handlebars.js:是 Mustache 模板語言的擴展。https://github.com/wycats/handlebars.js/
          • hogan.js:是 Mustache 模板語言的編譯器。https://github.com/twitter/hogan.js
          • doT:最快速簡潔的 JavaScript 模板引擎,適用于 nodejs 和瀏覽器。https://github.com/olado/doT
          • dustjs:適用于瀏覽器和 node.js 的異步模板。https://github.com/linkedin/dustjs/
          • eco:嵌入式的 CoffeeScript 模板。https://github.com/sstephenson/eco/
          • JavaScript-Templates:輕量(小于 1KB)、快速且無依賴的強大 JavaScript 模版引擎。https://github.com/blueimp/JavaScript-Templates
          • t.js:小巧的 JavaScript 模板框架,壓縮后約為 400 字節。https://github.com/jasonmoo/t.js
          • pug:健壯的、優雅且功能豐富的 nodejs 模板引擎。https://github.com/pugjs/pug
          • EJS:高效的 JavaScript 模板。https://github.com/mde/ejs
          • xtemplate:可擴展的模板引擎,適用于 node 和瀏覽器。https://github.com/xtemplate/xtemplate
          • marko:快速輕量且基于 HTML 的模板引擎,支持異步、流、自定義標簽和 CommonJS 模編譯后輸出。適用于 Node.js https://github.com/marko-js/marko)和瀏覽器。


          Flux


          Flux是Facebook用來構建客戶端Web應用的應用架構

          • Reflux是根據React的flux創建的單向數據流類庫。https://github.com/reflux/refluxjs
          • Redux是可預測javascript應用程序狀態的容器。http://redux.js.org/
          • Mobx是通過透明的函數響應式編程實現簡單,可擴展的狀態管理庫。https://mobx.js.org/
          • Dva是基于Redux, Redux-saga 和 react-router@2.x的輕量級的框架。https://github.com/dvajs/dva


          數據可視化


          Web 數據可視化工具

          • d3:一個對 HTML 和 SVG 進行可視化的 JavaScript 庫。https://github.com/mbostock/d3
          • metrics-graphics:更簡潔和擁有更規范的數據圖表布局優化算法的庫。https://github.com/mozilla/metrics-graphics
          • pykcharts.js:經過精心設計后,去除 d3.js 復雜性的 d3.js 圖表庫。https://github.com/pykih/PykCharts.js
          • three.js:JavaScript 3D 庫。https://github.com/mrdoob/three.js
          • Chart.js:簡單的、基于 canvas 標簽的 HTML5 圖表庫。https://github.com/nnnick/Chart.js
          • paper.js:是矢量圖形腳本中的瑞士軍刀 —— 使用 HTML5 Canvas 將 Scriptographer 移植到 JavaScript https://github.com/paperjs/paper.js)和瀏覽器。
          • fabric.js:JavaScript Canvas 庫,SVG 與 Canvas 可以相互解析。https://github.com/kangax/fabric.js
          • peity:進度條、線狀和餅狀圖。https://github.com/benpickles/peity
          • raphael:JavaScript 矢量庫。https://github.com/DmitryBaranovskiy/raphael
          • echarts:商業產品圖表。https://github.com/ecomfe/echarts
          • vis:動態的、基于瀏覽器的可視化庫。https://github.com/almende/vis
          • two.js:一個渲染器無關的適用于 web 的二維繪圖 api 。https://github.com/jonobr1/two.js
          • g.raphael:基于 Rapha?l 圖表庫。https://github.com/DmitryBaranovskiy/g.raphael
          • sigma.js:一個致力于圖形繪畫的 JavaScript 庫。https://github.com/jacomyal/sigma.js
          • arbor:一個使用 web workers 和 jQuery 的圖形可視化庫。https://github.com/samizdatco/arbor
          • cubism:可視化時間序列的 D3 插件。https://github.com/square/cubism
          • dc.js:與 crossfilter 無縫合作的多維圖表繪制庫,使用 d3.js 渲染。https://github.com/dc-js/dc.js
          • vega:一套可視化語法。https://github.com/trifacta/vega
          • processing.js:Processing.js 基于 Web 標準使數據可視化,而無需任何插件。http://processingjs.org/
          • envisionjs:動態的 HTML5 可視化。https://github.com/HumbleSoftware/envisionjs
          • rickshaw:用于構建交互式實時圖表的 JavaScript 工具包。https://github.com/shutterstock/rickshaw
          • flot:吸引人的、基于 jQuery 的 JavaScript 圖表庫。https://github.com/flot/flot
          • morris.js:漂亮的時間序列線框圖。https://github.com/morrisjs/morris.js
          • nvd3:一個為 D3.js 構建可復用圖表和圖表組件的庫。https://github.com/novus/nvd3
          • svg.js:一個輕量的、用于操作和添加 SVG 動畫的庫。https://github.com/wout/svg.js
          • heatmap.js:基于 HTML5 canvas 的熱力圖 JavaScript 庫。https://github.com/pa7/heatmap.js
          • jquery.sparkline:一個直接在瀏覽器端生成小型走勢圖的 jQuery 插件。https://github.com/gwatts/jquery.sparkline
          • xCharts:一個基于 D3、用于構建自定義圖表和圖形的庫。https://github.com/tenxer/xCharts
          • trianglify:基于 d3.js 的低多邊形(low poly)風格背景圖片生成器。https://github.com/qrohlf/trianglify
          • d3-cloud:創建詞云(word cloud)效果的 JavaScript 庫。https://github.com/jasondavies/d3-cloud
          • d4:一個基于 D3 、友好、可復用的 DSL 圖表庫 。https://github.com/heavysixer/d4
          • dimple.js:基于 d3 的簡易商業分析圖表庫。http://dimplejs.org/
          • chartist-js:簡單的響應式圖表。https://github.com/gionkunz/chartist-js
          • epoch:一個通用的實時圖表庫。https://github.com/epochjs/epoch
          • c3:基于 D3 的可復用圖表庫。https://github.com/masayuki0812/c3
          • BabylonJS:一個運用 HTML5 和 WebGL 構建 3D 游戲的框架。https://github.com/BabylonJS/Babylon.js
          • jquery.raty.js:一個星級評分插件。https://github.com/wbotelhos/raty

          也有一些很棒的收費庫,如 amchart、plotly 和 highchart。


          時間軸


          • TimelineJS:一個用 JavaScript 編寫的可敘事時間軸庫。https://github.com/NUKnightLab/TimelineJS
          • timesheet.js:用于構建簡單的 HTML5 & CSS3 時間表的 JavaScript 庫。https://github.com/semu/timesheet.js


          編輯器


          • ace:Ace(Ajax.org Cloud9 Editor)。https://github.com/ajaxorg/ace
          • CodeMirror:瀏覽器端的代碼編輯器。https://github.com/codemirror/CodeMirror
          • esprima:用于綜合分析的 ECMAScript 解析器。https://github.com/ariya/esprima
          • quill:一個帶有 API 的跨瀏覽器富文本編輯器。( http://quilljs.com/)
          • medium-editor:Medium.com 所見即所得編輯器的克隆版。https://github.com/yabwe/medium-editor
          • pen:享受在線編輯(支持 markdown)。https://github.com/sofish/pen
          • jquery-notebook:一個易用的、簡潔優雅的文本編輯器。靈感來源于 Medium 的魅力。https://github.com/raphaelcruzeiro/jquery-notebook
          • bootstrap-wysiwyg:小巧的、兼容 bootstrap 的所見即所得的富文本編輯器。https://github.com/mindmup/bootstrap-wysiwyg
          • ckeditor-releases:適用于每個人的 web 文本編輯器。https://github.com/ckeditor/ckeditor-releases
          • editor:一個 markdown 編輯器,但仍在開發中。https://github.com/lepture/editor
          • EpicEditor:一個可嵌入的 JavaScript Markdown https://github.com/OscarGodson/EpicEditor)的編輯器,擁有全屏編輯、即時預覽、自動保存草稿和離線支持等功能。
          • jsoneditor:查看、編輯和格式化 JSON 的 web 工具。https://github.com/josdejong/jsoneditor
          • vim.js:擁有持久化 ~/.vimrc 的 Vim 編輯器的 JavaScript 移植版本。https://github.com/coolwanglu/vim.js
          • Squire:HTML5 富文本編輯器。https://github.com/neilj/Squire
          • TinyMCE:JavaScript 富文本編輯器。https://github.com/tinymce/tinymce
          • trix:由 Basecamp 制作,適用于每天寫作的富文本編輯器。https://github.com/basecamp/trix


          文件


          處理文件的庫。

          • Papa Parse:一款強大的 CSV 庫,支持解析 CSV 文件/字符串,也能導出 CSV。https://github.com/mholt/PapaParse
          • jBinary:對用聲明式語法描述文件類型和數據結構的二進制文件,進行高級 I/O(加載、解析、操作、序列化、存儲)操作。https://github.com/jDataView/jBinary


          函數式編程


          函數式編程庫擴展了 JavaScript 的能力。

          • underscore:JavaScript 的實用工具。https://github.com/jashkenas/underscore
          • lodash:提供一致性、可定制、高性能和額外功能的實用庫。https://github.com/lodash/lodash
          • Sugar:一個擴展了原生對象功能的 JavaScript 庫。https://github.com/andrewplummer/Sugar
          • lazy.js:類似 Underscore,但性能更優越 https://github.com/dtao/lazy.js
          • ramda:一個針對 JavaScript 程序員的實用函數庫。https://github.com/CrossEye/ramda
          • mout:模塊化的 JavaScript 工具庫。https://github.com/mout/mout
          • mesh:流數據同步工具。https://github.com/crcn/mesh.js


          響應式編程


          響應式程序庫擴展了 JavaScript 的能力。

          • RxJs:對 JavaScript 進行響應式擴展。https://github.com/Reactive-Extensions/RxJS
          • Bacon:JavaScript 的 FPR(函數式響應式編程)庫。https://github.com/baconjs/bacon.js
          • Kefir:受 Bacon.js 和 RxJS 啟發的 FRP 庫,專注于高性能和低內存消耗。https://github.com/pozadi/kefir
          • Highland:對 JavaScript 實用工具的重新思考,Highland 能輕易地管理同步和異步信息,而且僅使用標準 JavaScript 和類 Node 流。http://highlandjs.org/
          • Most.js:高性能 FRP 庫。https://github.com/cujojs/most


          數據結構


          數據結構庫用于構建一個更復雜的應用。

          • immutable-js:不可變的數據集合,包括 Sequence、Range、Repeat、Map、OrderedMap、Set 和 sparse Vector。https://github.com/facebook/immutable-js
          • mori:使用 ClojureScript 持久化數據結構和支持原生 JavaScript API 的庫。https://github.com/swannodette/mori
          • buckets:完整的、經過充分測試和記錄數據結構的 JavaScript 庫。https://github.com/mauriciosantos/Buckets-JS
          • hashmap:簡單的 hashmap 實現,支持任何類型的鍵值。https://github.com/flesler/hashmap


          日期


          日期庫。

          • moment:解析、驗證、操作和顯示日期。https://github.com/moment/moment
          • moment-timezone:基于 moment.js 的時區庫。https://github.com/moment/moment-timezone
          • jquery-timeago:一款支持自動更新模糊時間戳的 jQuery 插件(如:"4 分鐘之前")。https://github.com/rmm5t/jquery-timeago
          • timezone-js:讓 JavaScript Date 對象擁有時區功能。使用 Olson zoneinfo 文件記錄著時區數據。https://github.com/mde/timezone-js
          • date:擁有人性化的 Date() 方法。https://github.com/MatthewMueller/date
          • ms.js:小巧的毫秒轉換工具。https://github.com/rauchg/ms.js
          • timeago.js:一個非常輕量級(~1.7 Kb)的用于將時間轉化成xxx時間前格式,例如:8分鐘前。http://timeago.org


          字符串


          字符串庫。

          • selecting:一個允許你獲取用戶選定文本的庫。https://github.com/EvandroLG/selecting
          • underscore.string:擴展了 Underscore.js 的字符串操作。https://github.com/epeli/underscore.string
          • string.js:額外的 JavaScript 字符串方法。https://github.com/jprichardson/string.js
          • he:健壯的 HTML 實體編碼/解碼器。https://github.com/mathiasbynens/he
          • multiline:多行字符串。https://github.com/sindresorhus/multiline
          • query-string:解析和字符串化 URL 查詢字符串。https://github.com/sindresorhus/query-string
          • URI.js:URL 操作庫。https://github.com/medialize/URI.js/)
          • jsurl:輕量的 URL 操作庫。https://github.com/Mikhus/jsurl
          • sprintf.js:實現字符串格式化。https://github.com/alexei/sprintf.js
          • url-pattern:讓 url 和其它字符串進行比正則表達式匹配更簡單。字符串和數據可相互轉化。https://github.com/snd/url-pattern


          數字


          • Numeral-js:對數字進行格式化和操作的庫。https://github.com/adamwdraper/Numeral-js
          • odometer:流暢的數字過渡效果。https://github.com/HubSpot/odometer
          • accounting.js:對數字、金錢、貨幣進行格式化的輕量庫——完全本地化和無依賴。https://github.com/josscrowcroft/accounting.js
          • money.js:一個小巧(1kb)的貨幣轉換庫,適用于 web 和 nodeJS。https://github.com/josscrowcroft/money.js
          • Fraction.js:一個有理數庫。https://github.com/infusion/Fraction.js
          • Complex.js:一個復數庫。https://github.com/infusion/Complex.js
          • Polynomial.js:一個多項式庫。https://github.com/infusion/Polynomial.js


          存儲


          • store.js:為所有瀏覽器封裝了 LocalStorage,而沒有使用 cookies 和 flash。隱秘地使用 localStorage、globalStorage 和用戶數據。https://github.com/marcuswestin/store.js
          • localForage:改善后的離線存儲。其封裝了 IndexedDB、WebSQL 和 localStorage,擁有操作簡單和強大的 API。https://github.com/mozilla/localForage
          • jStorage:jStorage 是一個簡單的鍵值對數據庫,用于在瀏覽器端存儲數據。https://github.com/andris9/jStorage
          • cross-storage:獲得權限后,能跨域名本地存儲。https://github.com/zendesk/cross-storage
          • basket.js:用 localStorage 加載和緩存腳本的資源加載器。https://github.com/addyosmani/basket.js
          • bag.js:可以緩存腳本和加載資源,與 basket.js 相似,但增加了鍵值對接口和對 localStorage / websql / https://github.com/nodeca/bag.js)undexedDB 的支持。
          • basil.js:智能的 JavaScript 數據持久層庫。https://github.com/Wisembly/basil.js
          • jquery-cookie:輕量簡單的、用于讀取、編輯和刪除 cookie 的 jQuery 插件。https://github.com/carhartl/jquery-cookie
          • Cookies:客戶端 Cookie 操作庫。https://github.com/ScottHamper/Cookies
          • DB.js:基于 Promise 的、封裝了 IndexedDB 的庫。https://github.com/aaronpowell/db.js/
          • lawnchair.js:簡單的客戶端 JSON 存儲。https://github.com/brianleroux/lawnchair/


          顏色


          • randomColor:JavaScript 顏色生成器。https://github.com/davidmerfield/randomColor
          • chroma.js:擁有各種各樣顏色操作的 JavaScript 庫。https://github.com/gka/chroma.js
          • color:JavaScript 顏色轉換和操作庫。https://github.com/MoOx/color
          • colors:更智能的默認 web 顏色。https://github.com/mrmrs/colors
          • PleaseJS:隨機創建出賞心悅目的顏色和配色方案。https://github.com/Fooidge/PleaseJS
          • TinyColor:快速、輕巧的顏色操作和轉換庫。https://github.com/bgrins/TinyColor
          • Vibrant.js:從圖像提取主要顏色。https://github.com/jariz/vibrant.js/


          國際化和本地化(I18n And L10n)


          本地化和國際化 JavaScript 庫

          • i18next:JavaScript 最簡單的國際化(i18n)方法。https://github.com/i18next/i18next
          • polyglot:小巧的國際化助手庫。https://github.com/airbnb/polyglot.js
          • babelfish:i18n 提供友好易懂的 API ,并且內置多種支持。https://github.com/nodeca/babelfish/



          • ClassManager:世界上最快、最方便的類系統之一。https://github.com/kogarashisan/ClassManager
          • klass:用于創建極富表現力的類工具庫。https://github.com/ded/klass
          • augment:世界上最小且最快的一流 JavaScript 繼承模式。https://github.com/javascript/augment


          控制流


          • async:適用于 node 和瀏覽器的異步工具庫。https://github.com/caolan/async
          • q:實現異步的 promise JavaScript 庫。https://github.com/kriskowal/q
          • step:讓邏輯順序合理化的異步控制流庫。https://github.com/creationix/step/
          • contra:利用函數風格實現的異步流控制。https://github.com/bevacqua/contra/
          • Bluebird:專注于革新功能和性能的,功能齊全的 promoise 庫。https://github.com/petkaantonov/bluebird/
          • when:快速可靠的、Promises/A+ 規范的 when() 實現,而且擁有異步其它的優秀特性。https://github.com/cujojs/when
          • ObjectEventTarget:提供增加了事件監聽的原型(與 DOMElement 的 EventTarget 在瀏覽器行為一致)。https://github.com/gartz/ObjectEventTarget


          路由


          • director:一個小巧的、與 URL 同構的路由器。https://github.com/flatiron/director
          • page.js:受 Express router 啟發的小型客戶端路由器(約為1200字節)。https://github.com/visionmedia/page.js
          • pathjs:簡單、輕量的 web 路由器。https://github.com/mtrpcic/pathjs
          • crossroads:JavaScript 路由。https://github.com/millermedeiros/crossroads.js
          • davis.js:使用 pushState、RESTful 風格和可降級的 JavaScript 路由器。https://github.com/olivernn/davis.js
          • angular-ui-router:基于AngularJS的可嵌套路由。http://angular-ui.github.io/ui-router/
          • react-router: Declarative routing for React [官方](https://github.com/ReactTraining/react-router
          • vue-router: Declarative routing for Vue [官方](https://router.vuejs.org/


          安全性


          • DOMPurify:針對 HTML、MathML 和 SVG 的僅支持DOM、快速、高容錯的 XSS 過濾器。https://github.com/cure53/DOMPurify
          • js-xss:通過白名單配置,即可過濾不信任的 HTML(防止 XSS 攻擊)。https://github.com/leizongmin/js-xss


          日志


          • log:帶有樣式的 Console.log。https://github.com/adamschwartz/log
          • Conzole:對 JavaScript 原生 console 對象方法和功能進行封裝的 debug 面板,使其顯示在頁面內。https://github.com/Oaxoa/Conzole
          • console.log-wrapper:將日志清晰地記錄到 console,且兼容所有瀏覽器。https://github.com/patik/console.log-wrapper
          • loglevel:最輕量的 JavaScript 日志記錄工具庫,向封裝后可用的 console.log 方法增加可靠的日志等級。https://github.com/pimterry/loglevel
          • minilog:輕量的、用流式 API 顯示的、可用于客戶端和服務器端的日志記錄庫。http://mixu.net/minilog/


          正則表達式


          • RegEx101:在線的 JavaScript 正則表達式測試器和調試器。同時支持 Python、PHP 和 PCRE。https://regex101.com/#javascript
          • RegExr:用于創建、測試和學習正則表達式的 HTML/JS 工具。http://regexr.com/
          • RegExpBuilder:使用鏈式方法創建正則表達式。https://github.com/thebinarysearchtree/regexpbuilderjs


          媒體


          • Ion.Sound:可用于任何網頁上簡單音頻。https://github.com/IonDen/ion.sound


          語音命令


          • annyang:向網站添加語音命令的語音識別庫。https://github.com/TalAter/annyang
          • voix.js:向網站、app 或游戲添加語音命令的 JavaScript 庫。https://github.com/pazguille/voix


          API


          • bottleneck:強大的頻率限制器,使調節流量變得更容易。https://github.com/SGrondin/bottleneck
          • oauth-signature-js:適用于 node 和 瀏覽器的 OAuth 1.0a 簽名生成器。https://github.com/bettiolo/oauth-signature-js
          • amygdala:為 Web 應用提供 RESTful HTTP 客戶端解決方案。https://github.com/lincolnloop/amygdala
          • jquery.rest:一個讓 RESTful API 更易使用的 jQuery 插件。https://github.com/jpillora/jquery.rest


          視覺檢測


          • tracking.js:在 web 上實現計算視覺的一種現代方法。https://github.com/eduardolundgren/tracking.js
          • ocrad.js:通過 Emscripten 用 JavaScript 實現 OCR(光學字符識別)。https://github.com/antimatter15/ocrad.js


          瀏覽器檢測


          • bowser:一個瀏覽器檢測器。https://github.com/ded/bowser


          性能分析


          • easy-monitor:一個輕量級實時 Node.js 項目的內核性能分析工具。http://www.easy-monitor.cn/document

          UI


          代碼高亮


          • Highlight.js:JavaScript 語法高亮器。https://github.com/isagalaev/highlight.js
          • PrismJS:輕量、健壯和優雅的語法高亮器。https://github.com/PrismJS/prism


          加載狀態


          指示加載狀態的庫。

          • Mprogress.js:創建谷歌 Material 設計風格的線性進度條。https://github.com/lightningtgc/MProgress.js
          • NProgress:在 Ajax'y 應用顯示細長型進度條 http://ricostacruz.com/nprogress/
          • Spin.js:一個旋轉的進度指示器。https://github.com/fgnass/spin.js
          • progress.js:為頁面任何對象創建和管理進度條。https://github.com/usablica/progress.js
          • progressbar.js:用 SVG path 動畫制作的、漂亮和響應式的進度條。https://github.com/kimmobrunfeldt/progressbar.js
          • pace:自動向你的網站添加一個進度條。https://github.com/HubSpot/pace
          • topbar:小巧漂亮的、與網站同寬的進度指示器。https://github.com/buunguyen/topbar
          • nanobar:非常輕量的進度條。不依賴 jQuery。https://github.com/jacoborus/nanobar
          • PageLoadingEffects:使用 SVG 動畫展現新內容的現代方式。https://github.com/codrops/PageLoadingEffects
          • SpinKit:運用 CSS 動畫的加載指示器集合。https://github.com/tobiasahlin/SpinKit
          • Ladda:內置在按鈕的加載指示器。https://github.com/hakimel/Ladda
          • css-loaders:運用 CSS 動畫的旋轉加載指示器的集合。https://github.com/lukehaas/css-loaders

          除了上述這些庫,還有收藏在 Codepen 的,另外還有 Ajaxload,Preloaders 和 CSSLoad 這些生成器。


          驗證


          • Parsley.js:不用寫一行 JavaScript 代碼即可在前端驗證表單。https://github.com/guillaumepotier/Parsley.js
          • jquery-validation:jQuery 驗證插件。https://github.com/jzaefferer/jquery-validation
          • validator.js:字符串驗證和過濾(在使用用戶輸入之前清理用戶輸入中的有害或危險字符的操作)。https://github.com/chriso/validator.js
          • validate.js:受 CodeIgniter 啟發的輕量表單驗證 JavaScript 庫。https://github.com/rickharrison/validate.js
          • validatr:跨瀏覽器的 HTML5 表單驗證庫。https://github.com/jaymorrow/validatr/
          • BootstrapValidator:是驗證表單域中最好的 jQuery 插件。要與 Bootstrap 3 一起使用。https://github.com/nghuuphuoc/bootstrapvalidator
          • is.js:檢查類型、正則表達式、是否存在、時間等。https://github.com/arasatasaygin/is.js
          • FieldVal:多用途驗證庫。同時支持同步和異步驗證。https://github.com/FieldVal/fieldval-js


          鍵盤封裝器


          • mousetrap:處理鍵盤快捷鍵的 JavaScript 庫。https://github.com/ccampbell/mousetrap
          • keymaster:定義和調度鍵盤快捷鍵的小型庫。https://github.com/madrobby/keymaster
          • hotkeys.js:一個強健的 Javascript 庫用于捕獲鍵盤輸入和輸入的組合鍵,它易于使用,沒有依賴。https://jaywcjlove.github.io/hotkeys/
          • Keypress:鍵入捕捉工具庫,任何鍵都可以成為一個修飾健。https://github.com/dmauro/Keypress
          • KeyboardJS:一個用于綁定鍵盤組合的 JavaScript 庫,讓你脫離快捷鍵和快捷鍵組合沖突的痛苦。https://github.com/RobertWHurst/KeyboardJS
          • jquery.hotkeys:jQuery Hotkeys 能讓你在代碼任何的地方監聽鍵盤事件,并幾乎支持所有按鍵組合。https://github.com/jeresig/jquery.hotkeys
          • jwerty:令人驚嘆的鍵盤事件處理庫。https://github.com/keithamus/jwerty


          瀏覽和引導


          • intro.js:這是一個介紹新功能的很好方式,能一步步地引導用戶瀏覽你的網站和項目。https://github.com/usablica/intro.js
          • shepherd:通過引導讓用戶瀏覽你的應用程序。https://github.com/HubSpot/shepherd
          • bootstrap-tour:應用 Twitter Bootstrap 彈出框對產品進行快速簡單的引導。https://github.com/sorich87/bootstrap-tour
          • tourist:簡單、靈活的應用引導介紹庫。https://github.com/easelinc/tourist
          • chardin.js:簡單的應用遮罩層介紹。https://github.com/heelhook/chardin.js
          • pageguide:使用 jQuery 和 CSS3 的 web 頁面元素交互引導庫。https://github.com/tracelytics/pageguide
          • hopscotch:讓開發者更容易向其頁面產品添加引導的框架。https://github.com/linkedin/hopscotch
          • joyride:基于 jQuery 的功能引導插件。https://github.com/zurb/joyride
          • focusable:通過向頁面其余部分添加遮罩層,使焦點聚集在特定 DOM 元素。https://github.com/zzarcon/focusable


          通知


          • messenger:為你的應用添加 Growl-style 彈框和信息(Crowl 是 Mac OS X 下的一個通知系統)。https://github.com/HubSpot/messenger
          • noty:jQuery 通知插件。https://github.com/needim/noty
          • pnotify:適用于 Bootstrap、jQuery UI 和 Web Notifications Draft 的 JavaScript 通知庫。https://github.com/sciactive/pnotify
          • toastr:用來顯示簡單的,會自動到期的信息窗口)簡單的彈出框通知(toast notifications https://github.com/CodeSeven/toastr
          • humane-js:一個簡單、時髦的瀏覽器通知系統。https://github.com/wavded/humane-js
          • smoke.js:與框架無關的、能夠自定義樣式的 JavaScript 彈框系統。https://github.com/hxgf/smoke.js


          幻燈片


          • Swiper:使用硬件加速過渡的移動設備觸控滑塊框架。https://github.com/nolimits4web/Swiper
          • slick:你所需要的最后一個輪播插件。https://github.com/kenwheeler/slick
          • slidesJs:響應式的 jQuery(1.7.1+)幻燈片插件,具有觸摸、 CSS3 過渡等特性。http://www.slidesjs.com/
          • FlexSlider:一款令人驚嘆的、全響應式的幻燈片 jQuery 插件。https://github.com/woothemes/FlexSlider
          • unslider:最簡單的幻燈片 jQuery 插件。https://github.com/idiot/unslider
          • colorbox:輕量、可自定義的燈箱 jQuery 插件。https://github.com/jackmoore/colorbox
          • fancyBox:提供了良好優雅的方式,為頁面上的圖片、html 內容和多媒體添加縮放功能的工具。https://github.com/fancyapps/fancyBox
          • sly:基于項導航的、支持單向滾動的 JavaScript 庫。https://github.com/darsain/sly
          • vegas:向頁面添加漂亮的全屏背景的 jQuery 插件,甚至允許幻燈片。https://github.com/jaysalvat/vegas
          • Sequence:用于創建響應式的幻燈片、演示、旗幟廣告和以步驟為基礎的應用的 CSS 動畫框架。https://github.com/IanLunn/Sequence
          • baguetteBox.js:易于使用的、用純 JavaScript 實現的遮罩層腳本。https://github.com/feimosi/baguetteBox.js
          • reveal.js:用 HTML 創建漂亮演示控件的框架。https://github.com/hakimel/reveal.js
          • PhotoSwipe:適用于移動設備和桌面電腦的、模塊化和不無依賴框架的 JavaScript 畫廊控件。https://github.com/dimsemenov/PhotoSwipe
          • jcSlider:用 CSS 動畫實現的響應式幻燈片 jQuery 插件。https://github.com/JoanClaret/jcSlider
          • basic-jquery-slider:易于使用、指定主題和定制化。https://github.com/jcobb/basic-jquery-slider
          • unslider:這是最簡單的幻燈片 jQuery 插件。https://github.com/idiot/unslider
          • viewerjs:原生js實現的圖片查看器。https://fengyuanchen.github.io/viewerjs/
          • jQuery.adaptive-slider:帶有自適應顏色標題和導航的幻燈片 jQuery 插件。https://github.com/creative-punch/jQuery.adaptive-slider/
          • slidr:可添加一些幻燈片效果。https://github.com/bchanx/slidr
          • Flickity:可觸摸的、響應式的和可輕彈的畫廊。https://github.com/metafizzy/flickity


          滑塊控件


          • Ion.RangeSlider:強大的、易于自定義的范圍滑塊選擇庫,支持很多配置和皮膚。https://github.com/IonDen/ion.rangeSlider
          • jQRangeSlider:支持日期的滑塊選擇庫。https://github.com/ghusse/jQRangeSlider
          • noUiSlider:輕量無冗余的、高度定制化的滑塊選擇庫。https://github.com/leongersen/noUiSlider
          • rangeslider.js:HTML5 input 區域滑塊元素。https://github.com/andreruffert/rangeslider.js


          表單組件


          輸入

          • typeahead.js:快速的、功能齊全的自動補全庫。https://github.com/twitter/typeahead.js
          • tag-it:處理多標簽字段以及標簽建議/自動完成的 jQuery UI 插件。https://github.com/aehlke/tag-it
          • At.js:向你的應用添加類似 Github 的自動完成提示功能。https://github.com/ichord/At.js
          • Placeholders.js:JavaScript 補全 HTML5 占位符的屬性。https://github.com/jamesallardice/Placeholders.js
          • fancyInput:利用 CSS3 效果讓輸入更有趣。https://github.com/yairEO/fancyInput
          • jQuery-Tags-Input:利用這個 jQuery 插件,可奇妙地將一個簡單的文本輸入轉換成一個酷酷的標簽列表。https://github.com/xoxco/jQuery-Tags-Input
          • vanilla-masker:一個純 JavaScript 實現的輸入控制庫。https://github.com/BankFacil/vanilla-masker
          • Ion.CheckRadio:一個為復選框和單選按鈕添加樣式的 jQuery 庫,支持多種皮膚。https://github.com/IonDen/ion.checkRadio

          日歷

          • pickadate.js:對移動設備友好的、響應式的和輕量的 jQuery 日期 & 時間輸入選擇器。https://github.com/amsul/pickadate.js
          • bootstrap-datepicker:基于 bootstrap 的日歷選擇器。https://github.com/eternicode/bootstrap-datepicker
          • Pikaday:一個嶄新的 JavaScript 日期選擇器 —— 輕量、無依賴和模塊化的 CSS。https://github.com/dbushell/Pikaday
          • fullcalendar:全尺寸、支持拖放事件的日歷(jQuery 插件)。https://github.com/fullcalendar/fullcalendar
          • rome:可定制的日期(和時間)選擇器。無依賴,可選 UI。https://github.com/bevacqua/rome
          • datedropper:datedropper 是一個 jQuery 插件,它提供了快速簡易的方式去管理日期輸入框。https://github.com/felicegattuso/datedropper
          • flatpickr:flatpickr 是一個輕量、強大、無依賴的日歷和時間選擇器插件,支持移動端,并支持React、Ember、Angular和Vue。https://chmln.github.io/flatpickr/

          選擇

          • selectize.js:Selectize 是文本框和選擇框的混合體。它基于jQuery,擁有自動完成和鍵盤感應下拉列表功能,可用于標簽、聯系人列表等。https://github.com/brianreavis/selectize.js
          • select2:它基于 jQuery,是選擇框(select box)的替代品。支持搜索、遠程數據集和無限滾動。https://github.com/select2/select2
          • chosen:可以讓冗長不便的選擇框更友好的庫。https://github.com/harvesthq/chosen

          文件上傳

          • jQuery-File-Upload:File Upload 是一個支持多文件選擇、文件拖放、進度條、驗證和圖片、音頻、視頻預覽的 https://github.com/blueimp/jQuery-File-Upload)jQuery 插件。
          • dropzone:Dropzone 是一個易于使用且支持多文件拖放的庫。其支持圖片預覽并且擁有很好的進度條效果。https://github.com/enyo/dropzone
          • flow.js:一個通過 HTML5 的 File API ,提供多個同時鏈接的、穩定的、容錯的、可恢復的/可重新開始的文件上傳庫。https://github.com/flowjs/flow.js
          • fine-uploader:一個帶有進度條、拖放功能和支持直接上傳到 S3 (Amazon Simple Storage Service,亞馬遜簡易存儲服務)的多文件上傳插件。https://github.com/FineUploader/fine-uploader
          • FileAPI:JavaScript 文件工具集合。支持多文件上傳、拖放和文件分塊上傳。對于圖像,支持裁剪、調整大小和根據 EXIF 自動調整方向。https://github.com/mailru/FileAPI
          • plupload:處理文件上傳的 JavaScript https://github.com/moxiecode/plupload)API,其支持多文件選擇、文件類型過濾、分塊請求、客戶端圖片縮放和根據不同的運行環境選擇 HTML5、Silverlight 和 Flash。

          其它

          • form:jQuery 表單插件。https://github.com/malsup/form
          • Garlic.js:自動在本地保存表單文本和選擇框的值,直到表單被提交。https://github.com/guillaumepotier/Garlic.js
          • Countable:對某個 HTML 元素包含文本的段落數、單詞數和字符數進行統計的 JavaScript 函數。https://github.com/RadLikeWhoa/Countable
          • card:只需一行代碼,讓信用卡表單變得更友好。https://github.com/jessepollak/card
          • stretchy:自適應大小的 form 元素,表單本應該是這樣的。https://github.com/LeaVerou/stretchy
          • list.js:向表格、列表等 HTML 元素添加搜索、排序、過濾和自適應功能的庫。在已有 HTML 上增加可視化。 https://github.com/javve/list.js


          提示


          • tipsy:基于 jQuery 的 Fackbook 風格的提示工具(tooltip)。https://github.com/jaz303/tipsy
          • opentip:開源且基于 prototype 框架的 JavaScript 工具提示庫。https://github.com/enyo/opentip
          • qTip2:非常強大的工具提示庫。https://github.com/qTip2/qTip2
          • tooltipster:一個工具提示 jQuery 插件。https://github.com/iamceege/tooltipster
          • simptip:用 Sass 制作的、簡單的工具提示。https://github.com/arashmanteghi/simptip
          • jquery-popup-overlay:是一個響應式的和可訪問性強的模態框(modal)和工具提示框 jQuery 插件。https://github.com/vast-engineering/jquery-popup-overlay


          模態框和彈出框


          • Magnific-Popup:專注于性能、輕量、響應式的燈箱(lightbox)腳本。https://github.com/dimsemenov/Magnific-Popup
          • jquery-popbox:jQuery 提示框插件。https://github.com/gristmill/jquery-popbox
          • jquery.avgrund.js:一種新的定于彈出的模態框 jQuery 插件。https://github.com/voronianski/jquery.avgrund.js
          • vex:新的、擁有高度可配置和易于改變樣式功能的對話框庫。https://github.com/HubSpot/vex
          • bootstrap-modal:對 Bootstrap 默認的模態框類進行擴展。其支持響應式、可堆疊和 ajax 等。https://github.com/jschr/bootstrap-modal
          • css-modal:純 CSS 打造的模態框。https://github.com/drublic/css-modal
          • jquery-popup-overlay:是一個響應式的和可訪問性強的模態框和工具提示框(tooltips)jQuery 插件。https://github.com/vast-engineering/jquery-popup-overlay
          • layer:國內最多人使用的web彈層組件。https://github.com/sentsin/layer/


          滾動


          • scrollMonitor:滾動發生時,可以監聽元素的、簡單、快速的 API。https://github.com/sakabako/scrollMonitor
          • headroom:除非你需要顯示頁面頭部(header),否則將隱藏它,以騰出頁面頭部空間。https://github.com/WickyNilliams/headroom.js
          • onepage-scroll:創建一個類似 Apple 的單頁面滾動網站(iPhone 5S 網站)。https://github.com/peachananr/onepage-scroll
          • iscroll:高性能、輕量、無依賴、兼容多平臺的 JavaScript 滾動組件。https://github.com/cubiq/iscroll
          • skrollr:獨立(不依賴 jQuery) 的視差滾動庫,適用于移動設備(Android + iOS)和桌面電腦。https://github.com/Prinzhorn/skrollr
          • parallax:面向智能設備的視差引擎。https://github.com/wagerfield/parallax
          • stellar.js:讓視差滾動變簡單。https://github.com/markdalgleish/stellar.js
          • plax:基于 jQuery 的視差庫。https://github.com/cameronmcefee/plax
          • jparallax:創建可交互視差效果的 jQuery 插件。https://github.com/stephband/jparallax
          • fullPage:簡單和易于使用的、用于創建全屏滾動網站的插件(也被稱為單頁面網站)。https://github.com/alvarotrigo/fullPage.js
          • ScrollMenu:讓老舊無聊的滾動條煥然一新。https://github.com/s-yadav/ScrollMenu


          菜單


          • jQuery-menu-aim:當用戶光標放在特定下拉菜單項時觸發事件。可制作響應式的、大數據量的下拉菜單,如 Amazon 的。https://github.com/kamens/jQuery-menu-aim
          • jQuery contextMenu:右鍵菜單(contextMenu) 管理工具。https://github.com/swisnl/jQuery-contextMenu
          • Slideout:為移動設備的 web 應用制作出響應式的、可觸摸滑出的導航菜單。https://github.com/mango/slideout
          • Slide and swipe:一個基于 touchSwipe 庫的滑出菜單插件。https://github.com/JoanClaret/slide-and-swipe-menu


          表格/柵格


          • jTable:基于 CRUD 表創建 AJAX 的 jQuery 插件。https://github.com/hikalkan/jtable
          • DataTables:這是一個非常靈活的工具,在漸進增強的基礎上,將高級的交互效果加到 HTML 表格。(jQuery 插件) http://www.datatables.net/)
          • floatThead:(jQuery 插件)鎖定表格頭部,只允許表格內容滾動。適用于任何表格,而且不需要額外的 html 或 css。https://github.com/mkoryak/floatThead
          • Masonry:瀑布流式的網格布局庫。http://masonry.desandro.com/
          • Packery:使用裝箱算法(bin-packing)的網格布局庫。支持拖拽布局。http://packery.metafizzy.co/
          • Isotope:可過濾和可排序的網格布局的庫,它能實現 Masonry、Packery 等布局。http://isotope.metafizzy.co/


          框架


          • Semantic UI:擁有大量主題和元素的 UI 套件。http://semantic-ui.com/


          手勢


          • hammer.js:擁有多種觸摸手勢的 JavaScript 庫。https://github.com/hammerjs/hammer.js
          • touchemulator:在桌面電腦模仿觸摸輸入。https://github.com/hammerjs/touchemulator
          • Dragula:超級易于使用的拖拽庫。https://github.com/bevacqua/dragula/


          觸摸


          • fastclick.js:去除觸屏用戶300ms點擊延誤。https://github.com/ftlabs/fastclick
          • dropload.js:移動端下拉刷新,上拉加載更多。https://github.com/ximan/dropload
          • touchslide.js:觸屏滑動特效。http://www.superslide2.com/touchSlide/


          地圖


          • Leaflet:對移動設備友好的、可交互的地圖 JavaScript 庫。https://github.com/Leaflet/Leaflet
          • Cesium:開源的、基于 WebGL 實現的虛擬地球儀和地圖引擎。https://github.com/AnalyticalGraphicsInc/cesium
          • gmaps:以最簡單的方式使用 Google 地圖。https://github.com/HPNeo/gmaps
          • polymaps:一個免費的、兼容現代 web 瀏覽器的、用于制作動態可交互的地圖 JavaScript 庫。https://github.com/simplegeo/polymaps
          • kartograph.js:開源的 Kartograph SVG 地圖渲染器。https://github.com/kartograph/kartograph.js
          • mapbox.js:Mapbox 的 API,Leaflet 的插件。https://github.com/mapbox/mapbox.js
          • jqvmap:矢量地圖 jQuery 插件。https://github.com/manifestinteractive/jqvmap
          • OpenLayers3:高性能的、功能豐富的庫,能滿足你對地圖所有需求。http://openlayers.org/


          視頻/音頻


          • prettyembed.js:更完美地嵌入 YouTube —— 擁有很好的選項,如高分辨率的預覽圖、嵌入選項的高級定制和可選的 https://github.com/mike-zarandona/prettyembed.js)FitVids 支持。
          • html5media:能在所有主流瀏覽器播放多媒體標簽中定義的多媒體文件。https://github.com/etianen/html5media
          • Play-em JS:Play'em 是一個 JavaScript 組件,它能管理音樂/視頻播放順序,通過在一個 DIV 元素里嵌入幾個播放器(Youtube、Soundcloud 和 Vimeo)來控制一系列歌曲的播放。https://github.com/adrienjoly/playemjs
          • polyplayer:將 YouTube、Soundcloud 和 Vimeo 播放器的 API 統一成一套。https://github.com/Acconut/polyplayer
          • flowplayer:HTML5 視頻播放器 https://flowplayer.org/)、[Github](https://github.com/flowplayer/flowplayer
          • mediaelement:讓 HTML5、 Flash 播放器和模仿 HTML5 媒介元素 API 的 Silverlight shim,在所有瀏覽器擁有一致的 UI。http://mediaelementjs.com/)、[Github](https://github.com/johndyer/mediaelement
          • SoundJS:讓音頻在 web 上運行更簡單的庫。它為不同瀏覽器提供了一致的 API。https://github.com/CreateJS/SoundJS


          動畫


          • velocity:加速 JavaScript 動畫。https://github.com/julianshapiro/velocity
          • jquery.transit:擁有超級流暢的 CSS3 變換和過渡的 jQuery 插件。https://github.com/rstacruz/jquery.transit
          • impess.js:在 HTML 文檔里,運用 CSS3 變換和過渡制作類似 Prezi 的展現效果。https://github.com/impress/impress.js
          • bounce.js:可以立刻創建有趣的 CSS3 動畫。https://github.com/tictail/bounce.js
          • GreenSock-JS:適用于所有主流瀏覽器的高性能 HTML5 動畫。https://github.com/greensock/GreenSock-JS
          • TransitionEnd:TransitionEnd 是一個運用 transitonend 事件的、跨瀏覽器的庫。https://github.com/EvandroLG/transitionEnd
          • Dynamics.js:用于創建基于物理知識的 CSS 動畫庫。https://github.com/michaelvillar/dynamics.js


          圖片處理


          • lena.js:擁有濾鏡和實用功能的圖像處理庫。https://github.com/davidsonfellipe/lena.js
          • pica:高質量地調整圖片大小(擁有快速的、純 JS 實現的 Lanczos 濾鏡算法)。https://github.com/nodeca/pica
          • cropper:一個簡單的圖像裁剪 jQuery 插件。https://github.com/fengyuanchen/cropper
          • AlloyImage:騰訊前端開源的基于HTML5的專業級圖像處理開源引擎。https://github.com/AlloyTeam/AlloyImage


          ECMAScript 6


          • es6features:ECMAScript 6 特性概述。https://github.com/lukehoban/es6features
          • es6-features:ECMAScript 6: 特性概述和比較。https://github.com/rse/es6-features
          • ECMAScript 6 compatibility table :Compatibility tables 展示了各種平臺上所有 ECMAScript 6 特性的支持程度。http://kangax.github.io/compat-table/es6/
          • Babel (Formerly 6to5):將 ES6+ 代碼轉換成純 ES5。https://github.com/babel/babel
          • Traceur compiler:ES6 特性轉 ES5。包括 classes、generators、promises、destructuring https://github.com/google/traceur-compiler)patterns、default parameters 等。


          軟件開發工具包(SDK)


          • javascript-sdk-design:從工作和個人經驗中提煉出來的 JavaScript SDK 設計指導。https://github.com/huei90/javascript-sdk-design


          大雜燴


          • echo:利用 data-* 屬性延遲加載圖片。https://github.com/toddmotto/echo
          • picturefill:響應式圖片顯示插件,使瀏覽器支持 srcset、size 屬性。https://github.com/scottjehl/picturefill
          • platform.js:一個平臺檢測庫,幾乎適用于所有 JavaScript 平臺。https://github.com/bestiejs/platform.js
          • json3:一個現代 JSON 實現庫,幾乎兼容所有 JavaScript 平臺。https://github.com/bestiejs/json3
          • Logical Or Not:一個關于 JavaScript 特性的游戲。http://gabinaureche.com/logicalornot/
          • BitSet.js:實現位向量的 JavaScript 庫。https://github.com/infusion/BitSet.js
          • Edge.js:運行在一個進程中運行.NET和Node.js代碼。http://tjanczuk.github.io/edge/)、[GitHub](https://github.com/tjanczuk/edge

          題表現

          就在我正準備錄制下個系列視頻的時候,發現何方的個人小站-Markdown 工具頁面下面出現了大面積的空白(如下圖 1)。 這是什么情況?我第一反應可能是我忘了給代碼或預覽的窗口添加 overflow: auto 導致元素的整個長度直接推在了元素流里面。

          圖1 - 下面出現大面積空白

          原因分析?

          但當我看了代碼和界面以后發現是對的(如下圖 2),并沒有忘記添加 overflow: auto。而且我查看 body 元素的時候發現高度是正常的,并沒有包含下面空白區域的高度。這時候我感覺可能是 Edge 瀏覽器的 Bug。于是我試了 Chrome、Firefox、Safari 以及 Linux 和 Windows 中的各種瀏覽器,都能復現這個問題。確定了不是瀏覽器的 Bug。

          圖2 - overflow: auto

          于是我又查看了 html 元素的高度,發現在 html 高度竟然是包含了空白區域高度的(如下圖 3)。到這個時候我就確定一定是有什么元素浮動到了元素流里面,而且這個元素一定是不可見或非常小的,這就只能逐個排查可能的元素。

          圖3 - html 高度

          在我排查過程中發現如果把預覽關掉或不預覽 HTML 渲染結果(見下圖 4),只預覽 HTML 代碼的情況下是沒有空白問題的。這就可以確定是 Markdown 的渲染結果出現了問題。但渲染結果是 Markdown 解析器生成的,這又增大了排查的難度。

          圖4 - 關閉預覽

          這個時候我突然想起來,瀏覽器的開發都工具是可以查看頁面 3D 結構的。在復合圖層里面并沒有看出什么問題(見下圖 5)。但當我查看 3D DOM 結構(見下圖 6)并把視頻拉到最下面是發現了問題——在最下面出現了幾條東西。點擊 3D 視圖可以跳轉到對應的 dom 結果里面,原來導致頁面空白的罪魁禍首是公式(見下圖 7)。

          圖5 - 3D視圖復合圖層

          圖6 - DOM結構

          問題原因?

          我在 Markdown 生成 HTML 的時候使用的是 katex 來渲染公式,默認情況下它會生成兩套 DOM 結構,一套 mathml 用于讀屏軟件或搜索引擎等識別這是公式、另一套是 html 它用于渲染顯示我們看到的公式。

          為了不讓 mathml 和 html 同時顯示出現,katex 把 mathml 設置成了 position: absolute 且只有一個像素大小。

          .katex-mathml {  clip: rect(1px, 1px, 1px, 1px);  border: 0;  height: 1px;  overflow: hidden;  padding: 0;  position: absolute;  width: 1px;}

          圖7 - 公式DOM結構

          問題就出在了 position: absolute 上面,因為我們的預覽容器是 overflow: auto 的。在可滾動的容器里面如果存在絕對定位的元素,這個元素就會脫離容器出現在主元素流里面。也就是說如果容器沒有溢出滾動的時候這個元素該出現在哪兒,在有溢出滾動的時候它還在那兒。這就造成了它前面出現的空白。

          解決方案?

          知道了問題原因也就好解決了,三種改動較小的方案1:

          1. 把 katex 生成 htmlAndMathml 改為 html。
          2. 把類 .katex-mathml 的 position: absolute 改成 position: fixed。
          3. 把 .katex-mathml 的父類的 position 改成非 static。

          主站蜘蛛池模板: 亲子乱AV视频一区二区| 无码人妻精品一区二区蜜桃| 蜜臀AV免费一区二区三区| 亚洲电影一区二区三区| 亚洲AV无码片一区二区三区| 国产一区二区三区不卡在线看 | 视频一区在线播放| 亚洲日本一区二区一本一道| 国产在线无码视频一区二区三区| 精品人妻一区二区三区浪潮在线| 在线一区二区观看| 中文字幕亚洲一区| 在线精品视频一区二区| 国产韩国精品一区二区三区| 亚洲福利秒拍一区二区| 精品理论片一区二区三区| 国产精品日本一区二区在线播放 | 国产激情无码一区二区| 亚洲欧美成人一区二区三区| 久久精品无码一区二区日韩AV| 精品无码一区二区三区爱欲| 无码精品久久一区二区三区| 人妻无码第一区二区三区 | 日韩精品一区二区三区中文精品| 国产剧情一区二区| 亚洲一区在线视频观看| 一区二区网站在线观看| 一区二区三区无码被窝影院| 国产一区二区三区夜色| 国产香蕉一区二区三区在线视频| 国产av成人一区二区三区| 激情久久av一区av二区av三区| 国精产品一区二区三区糖心| 韩国福利视频一区二区 | 日韩国产免费一区二区三区| 久久婷婷色综合一区二区| 国产丝袜无码一区二区视频| 久久亚洲AV午夜福利精品一区| 色噜噜一区二区三区| 亚洲日韩AV一区二区三区四区| 久久国产一区二区三区|