CSS for horizontal and vertical centering

css picture horizontal center 1. Use margin: 0 auto to realize image horizontal center <div style="margin:0 auto; text-align: center;"></div> 2. Use text align: Center <div style="margin:0 auto; text-align: center;"> <p>Using margin: 0 auto to realize image horizontal center</p&g ...

Posted on Mon, 04 May 2020 15:42:35 -0700 by rulkster2

Native js dynamically displays static page content according to url parameters

In the project, we need to do static processing for the content, only loading an h5 page can display the content, instead of loading resource files such as. css or. js to improve the page loading speed. The static content displayed on the page can be divided into three languages, so it needs to be processed dynamically. ...

Posted on Mon, 04 May 2020 13:54:33 -0700 by estan

MySQL learning note 1 (add, delete, check and modify)

To create a table: /* Create database create database Database name; */ CREATE DATABASE mybase; /* Use database use Database name */ USE mybase; /* Create data table format create table Table name( Column name 1 data type constraint, Column name 2 data type constraint, Column name 3 ...

Posted on Sun, 03 May 2020 12:56:35 -0700 by drums

Analysis of Zepto source code design structure

Zepto can be said to be a simplified version of jQuery, mainly for the mobile end. The use method is not too different, and the source code is easier to read. Basic structure var Zepto = (function(){ var $, zepto = {} // ...ellipsis N Line code... zepto.init = function(selector, context) { ...

Posted on Sun, 03 May 2020 12:23:18 -0700 by SamShade

LNMP Architecture - Nginx load balancing

The principle of load balancing is agent, only by setting up multiple proxy servers to achieve multi-user access load balancing. At the same time, when a proxy server cannot be accessed, it can switch to another proxy server, so as to achieve the purpose of uninterrupted access. Configure load balancing 1. Use ...

Posted on Sun, 03 May 2020 03:20:45 -0700 by CodeMama

Handwritten signature plug-in - using experience of jSignature

Recently, we need to do a function of handwritten signature on the mobile terminal. After searching the Internet, it's basically the jSignature plug-in. There's almost no second choice. So we can follow the copy test of various versions on the Internet. It's easy to test on the PC terminal. However, after the mobile te ...

Posted on Sat, 02 May 2020 18:00:51 -0700 by Poomerio

js object oriented factory pattern (super basic)

Recently, I have developed a small project with low technical level, and then I write in a mess. Why don't I use object-oriented encapsulation after that? Every call is ok? And then I started object-oriented learning html: <button id="btn1">Button1</button> <button id="btn2">Button1</button> css: /*Clear ...

Posted on Fri, 01 May 2020 19:27:20 -0700 by ihsreal

Implementation of vue tap event

Two days ago, I made a plug-in of tap.js to simulate the click event of the touch event on the mobile terminal to solve the problem of click delay. However, in Vue, v-tap can not be used to call, so I made vue-tap.js today. Other plug-ins have been used to implement v-tap before, but the way is still cumbersome, so it is implemented in a more c ...

Posted on Fri, 01 May 2020 13:28:22 -0700 by pleisar

Simple encapsulation of OkHttpClient network request

OkHttp3 package First, let's take a look at OkHttp OkHttp is a sophisticated network request library with the following features: 1) Support http2, share the same socket for all requests of one machine 2) Built in connection pool to support connection reuse and reduce latency 3) Support transparent gzip compressi ...

Posted on Fri, 01 May 2020 03:36:30 -0700 by bstruss

62. (android Development) upload files using okhttp

To develop android mobile client, you often need to upload files to the server, such as: photos in your mobile phone. Using okhttp would be a good choice. It is easy to use and efficient to run. First, add implementation 'com. Square up. Okhttp3: okhttp: 3.8.1' in the dependencies of app/build.gradle. You can refer to the following code apply p ...

Posted on Thu, 30 Apr 2020 09:25:31 -0700 by danbot26