The mobile terminal h5 determines whether to scroll to the bottom and pull down to load

How to judge whether the scroll reaches the bottom? The first knowledge to understand: scrollHeight,clientHeight,scrollTop scrollHeight Read only property, height includes all contents, including inner margin, but not including horizontal scroll bar, border and outer margin. clientHeight It is also a read-only attribute. The element without ...

Posted by fahrvergnuugen on Fri, 15 Nov 2019 06:33:34 -0800

Development of obit system

Sometimes we need to derive some states from the state in the store, such as: Copy code<div id="app"> <p>{{reverseMessage}}</p> </div><script> const store = new Vuex.Store({ state:{reverseMessage:'Hello Vue!'} }) new Vue({ el:'#app', store, computed:{ reverseMessage:function(){return this.$ ...

Posted by Suchy on Fri, 15 Nov 2019 00:18:14 -0800

echarts implements external call chart download method, compatible with chrome and IE10+

In the process of project development, there is often a demand for image export, especially for the application with chart class. It is usually necessary to download and export the chart. Although echarts provides a download component in the chart, it is inevitable for specific projects to call this method to save the picture outside the chart ...

Posted by bo0 on Thu, 14 Nov 2019 20:23:32 -0800

Native JS for image scrolling

I. principle The black box is the area where the final rolling image is displayed, and the green box is its sub container, whose width is larger than the black outer box, so that the image rolling can be realized by setting the scrollLeft of the black box. The innermost blue box is used to wrap all the scrolling images, while the content of t ...

Posted by saltious on Thu, 14 Nov 2019 10:54:38 -0800

js implementation of page self adaption with different computer resolutions

Absrtact: there are many kinds of computer screens, plus the system's own zoom settings, making the screen resolution different, so we will encounter the trouble of different sizes when using px units. Although there are percentage, em, rem, vh, vw and other css units, they are not friendly to animation, and they are not direc ...

Posted by guilhenfsu on Thu, 14 Nov 2019 10:24:19 -0800

python Foundation (27): modifier of class member, special member of class

1. Modifiers for class members All members of a class have been described in detail in the previous step. There are two forms of members of each class: Public members, accessible anywhere Private member, can only be used inside the class Private members and public members are defined differently: when private members are named, the first two ...

Posted by nikosft on Thu, 14 Nov 2019 04:46:07 -0800

python Foundation (26): class members (fields, methods, properties)

1. field Field: it includes normal field and static field. They are different in definition and use, but the most essential difference is the location saved in memory. Common fields belong to objects Static fields belong to class Definition and use of fields: class Province: # Static field country = 'China' def __init__(self, ...

Posted by gorskyLTD on Thu, 14 Nov 2019 02:41:09 -0800

Basic use and source code analysis of PromiseKit

Promise is an application framework that deals with a series of asynchronous operations. It can ensure that a series of asynchronous operations can be executed in sequence. When an error occurs, it can be handled by catch ing the error. Promise framework is also a good interpretation of swift's face-to-face protocol programming and functional p ...

Posted by Hagbard on Thu, 14 Nov 2019 00:55:09 -0800

python Foundation (24): one of the three characteristics of object-oriented (inheritance)

1. inheritance 1.1 what is inheritance Inheritance is a way to create a new class. In python, a new class can inherit one or more parent classes. The parent class can also be called a base class or a superclass. The new class is called a derived class or a subclass. The inheritance of classes in python can be divided into single inheritance and ...

Posted by BMorganVA on Wed, 13 Nov 2019 06:54:55 -0800

java review record

Topic analysis With the idea of object-oriented, write a self defining class to describe the book information. The set attributes include: book name, author, publisher name, price; set the private access rights of the attribute, and access to the attribute through the public get and set methods] (here write the custom director ...

Posted by daggardan on Tue, 12 Nov 2019 11:50:16 -0800