HTML game making based on Canvas

Development tools: vs code About Canvas Define Canvas <canvas id="xxx" width="..." height="..." style="border: 2px solid #000;background: #fff;"></canvas> Game examples 1. Jigsaw puzzle 2. Thunderbolt aircraft 3,Flappybird 1, Jigsaw puzzle The game is introduced: the jigsaw game divides a picture into several pieces and randomly scr ...

Posted on Thu, 02 Apr 2020 03:56:20 -0400 by Daguse

Synchronous interaction, asynchronous interaction and ajax basic usage

Synchronous interaction To make a request, you need to wait for the server's response to end before you can make a second request. A common situation is that some websites get stuck when you click too fast. Every request refreshes the entire page. Asynchronous interaction After a request is sent, a second request can be se ...

Posted on Thu, 02 Apr 2020 03:32:07 -0400 by mike97gt

Profile Yaml

Yaml I. Introduction (1) YAML language (pronunciation / ˈ j æ m ə l /) is designed to facilitate human reading and writing. It is essentially a general data serialization format. (2) Basic rules Case sensitive Use indents to represent hierarchy Tab is not allowed when indenting, only spaces are allowed. ...

Posted on Thu, 02 Apr 2020 02:46:40 -0400 by frog_

Learning Element.scrollIntoView of js

1,Element.scrollIntoView() This method allows the current element to scroll into the browser window's but area; 2. Syntax: element.scrollIntoView(); / / equivalent to element. Scrollintoview (true) element.scrollIntoView(alignToTop);//Boolean type parameter element.scrollIntoView(scrollIntoViewOptions);//Object type parameter parameter ...

Posted on Wed, 01 Apr 2020 23:57:23 -0400 by swissbeets

Detailed explanation of the binding between vue class and style

1, Several ways to bind a class 1. Object syntax Let's take a look at the example: <div id="app3"> <div :class="{'success':isSuccess,'fail':isFail}">Object binding class</div>  //Simple processing uses data directly to judge <div :class="classes">Compute property binding class</div>  //When ...

Posted on Wed, 01 Apr 2020 22:58:27 -0400 by YodaOfCamarilla

Front end gadgets. Delete. Fold. Maximize. Drag layout. Tree menu

The above is the overall layout Add Remove method Array.prototype.indexOf = function (val) { for (var i = 0; i < this.length; i++) { if (this[i] == val) return i; } return -1; }; Array.prototype.remove = function (val) { var index = this.indexOf(val); if (index > -1) { this.splice(index, 1); } };   Passing in id can delete correspondin ...

Posted on Wed, 01 Apr 2020 18:45:15 -0400 by sc00tz

A detailed explanation of nth child and nth of type in jQuery

First, paste the HTML code: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js"> </script> <script> $(document).ready(function(){ $("button").click(function(){ var btn = $(this).text(); $("p").css("background-color", ...

Posted on Wed, 01 Apr 2020 17:29:06 -0400 by mu-ziq

Some understanding of vue life cycle and hook function

1, Announcement cycle picture on official website 2, Introduction to the life cycle functions of vue1.0 and vue2.0 3, Case explanation 1. Simple case <!DOCTYPE html> <html> <head> <title></title> <script type="text/javascript" src="https://cdn.jsdelivr.net/vue/2.1.3/vue.js"&g ...

Posted on Wed, 01 Apr 2020 16:34:29 -0400 by Drumminxx

The implementation of vue global variables

Recently, the learning of VUE.js involves JS global variables, which are not so much VUE global variables as modular JS development global variables. 1. Global variable specific module It is to organize and manage these global quantities with a specific module. It is convenient to import the module where reference is ...

Posted on Wed, 01 Apr 2020 14:24:23 -0400 by Havok

The perfect combination of Bmob and Promise

In the trial scenario, a table is queried by bmob criteria, and then the data returned by the table is queried by multiple tables. The data queried by multiple tables is integrated into a single data until it is finally rendered to the view layer, that is, various asynchronous operations. Let's first look at the query of Bmob con ...

Posted on Wed, 01 Apr 2020 12:16:00 -0400 by murali