Front-end Common Problem: Android Text Can't Center Vertically

The Problem that Android Text Can't Center Vertically problem Android webview font size less than 12 pixels can not use line height to center vertically ps: At present, this problem exists in applications such as Wechat, but it does not exist in the latest mobile Chrome browser (as of the writing time of this article, the chrome version of Wech ...

Posted by EriRyoutan on Fri, 17 May 2019 00:46:50 -0700

Implement a particle system from 0 to 1

Recently, a small program has been developed that addresses the need for dynamic effects. We originally planned to use a gif diagram to achieve this dynamic effect, but the gif diagram has three drawbacks: The gif map of high quality kinetics performance is at least 2MB in size. Too many dynamic details make it difficult to achieve a seamless ...

Posted by scrypted on Thu, 16 May 2019 01:31:39 -0700

Front-end chatter: DOM event principle

DOM events are common to front-end developers. Event monitoring and triggering are very convenient to use, but what are their principles? How do browsers handle event binding and triggering? Let's look at it in detail by implementing a simple event handler. First, how to register event? As we all know, there are three ways to register: Registr ...

Posted by jocknerd on Wed, 15 May 2019 08:35:54 -0700

Core concepts of webpack-dev-server

Core concepts of webpack-dev-server ContentBase vs publicPath vs output.path of Web pack webpack-dev-server uses the current path as the requested resource path (so-called Current Path This is the path to run the command webpack-dev-server, if the webpack-dev-server is wrapped, for example wcf The current path refers to the path to run the ...

Posted by john_bboy7 on Tue, 14 May 2019 05:04:11 -0700

Play CSS 3D - regular octahedron and regular dodecahedron

Octahedron and dodecahedron, although the two regular polyhedrons have more combinations of faces, but because of the symmetry, only half of the structure needs to be made, and the other half can be connected by inversion. Regular eight face Orthooctahedron can be imagined as "two pyramids" overlapping together. In order to facilitate ...

Posted by HeyRay2 on Sat, 11 May 2019 06:31:55 -0700

Do not update after treading pit vue v-for operation DOM

Do not update after treading pit vue v-for operation DOM Preface Recently, when I read the style guide for vue, I found a problem that I had previously ignored in learning or even developing. Picture Description phenomenon Looking at the above paragraph, I think I have encountered similar problems when I was just developing.It is after forcibly ...

Posted by Hamlets666 on Fri, 10 May 2019 23:53:03 -0700

Using Webpack to Realize Multi-project Management of Small Programs

This is how the story begins. Front-end development brother Bingo receives the demand of product ladies and sisters, and has to go online with several small programs. Code Animal Brother Begins Architecture Miscellaneous small procedures, put a project to facilitate management There are many small programs, so the code should be reusable. Team ...

Posted by maniac1aw on Fri, 10 May 2019 10:38:01 -0700

CSS pseudo-elements (content and counter)

In CSS, we introduced the pseudo elements: before and after, as well as the usage of content. This article will make some interesting applications for content matching counter. I believe it will be interesting if you are proficient. Basic usage of counter In CSS, counter is a very interesting function. The most common thing is that if we use li ...

Posted by ondercsn on Tue, 07 May 2019 21:40:38 -0700

How to Track Users with Web Page Scripts

This article describes how to write JavaScript scripts to send user data back to the server. I made one Code repository , which includes all the examples below, allows you to run View Effects. 1. Synchronize AJAX A common practice for sending data back to the server is to place the collected user data in an unload event and send i ...

Posted by thomasanup on Sun, 28 Apr 2019 22:20:38 -0700

Regular polygon transformation of a single div (pure CSS)

In the previous article, we introduced how to use before and after pseudo elements to make Material Design style buttons. The key technology is to make use of the border width and div body width. So one additional effect of this article is to simply use CSS to make a "single" div change from a regular triangle to an octagon (a single ...

Posted by Sekka on Sun, 28 Apr 2019 04:10:37 -0700