» Articles for January 2019 Year

Sort articles by: Date | Most Rates | Most Views | Comments | Alphabet

Implementation of file breakpoint resume by HTML5

Author: bamboo06 on 31-01-2019, 22:10, views: 104

1 HTML5's FILE api has a slice method that splits the BLOB object. The front end obtains the corresponding file through the FileList object, segments the large file according to the specified splitting manner, and then passes it to the back end one by one, and then the back end then splicing the files in a sequence.
Implementation of file breakpoint resume by HTML5

At present, there are two commonly used methods for resuming breakpoints. One is to upload files through the websocket interface, and the other is through ajax. Both methods have their own advantages. Although websocket sounds more high-end, it uses different ones. The other algorithms outside the protocol are basically similar, and the server needs to open the ws interface. Here, the relatively convenient ajax is used to illustrate the idea of uploading the breakpoint.

Category: Javascript / HTML5


Core.css - lightweight CSS reset and grid system

Author: bamboo06 on 31-01-2019, 22:03, views: 53

0 Core.css is a very small CSS reset and grid system. If your project is very small, you don't need to use a large css framework such as Bootstrap. You only need less than 4kb core.css, you can have css reset. And grid systems and responsive layouts.
Core.css - lightweight CSS reset and grid system

Core.css uses a .row to represent the rows in the container. If you append a class with the largest width to it, it represents a fixed-width row, otherwise it is a full-screen row. .col represents the column in the container, which divides the width of the container into 12 columns, which is what we often call a 12-grid system. .xs-12 represents a column width of 100%. Similarly, .xs-3 represents a column width of 25% because it requires 4 .xs-3 to reach 100% of the 12 grid. Others are analogously from .xs-1 to xs-12.

Category: CSS