Fang Shuwei

Front-end

» front-end

Articles by category: front-end


setup others
2020
22 Mar 2020

Configure webpack 4 for css files

Webpack is a static module bundler for modern JavaScript applications. Css is the essential part for the JS web app....

2017
22 Jun 2017

Express in action 读书笔记

Just finish reading Express in Action. Some highlights here. Part 1: Intro 1. What is Express? Express is a relatively...

2016
26 Dec 2016

jQuery sortable with responsive UI and touch device support

I need to build a image previewer as part of an web app which allows drag and drop for sorting....

03 Dec 2016

Work around CSS styling for IE8

Work around CSS styling for IE8 Frontend technology is booming today. However it’s not for IE8. As there is still...

2014
10 Sep 2014

Jasmine test for AngularJS nested callback

今天写了一个function,里面涉及了两个callback,大概形式为 function callbackFunction() { ServiceA.callbackA(data1, function(result1){ //success function callback ServiceA.callbackA(data2, function(result2{ return [result1, result2]; }, function(error){ console.log(error); }); }, function(error){...

13 Jul 2014

在Chart.js上显示自定义tooltip

Chart.js允许通过HTML5的canvas进行图表绘制。这里我们希望绘制一个环形图,点击图上各segment时可以显示自定义的圆形tooltip。 Chart.js支持通过几个变量添加tooltip,它提供一个tooltipTemplate但是却不支持自定义tooltip的HTML!于是决定自行绘制tooltip手动添加上去。 绘制一个tooltip CSS: .ft{ background:#bbaabb; position:absolute; left:100px; top:150px; } .circle{ width:100px; height:100px; border-radius:50px; font-size:20px; color:#fff; line-height:100px; text-align:center; background:#aa9966} HTML:...