You'll like the new array method: array At (index)

Author: dmitripavlutin Translator: front end Xiaozhi Source: dmitripavlutin Recently, a Vue component has been opened source, which is not perfect enough. Welcome to improve it together. I also hope you can give star support. Thank you. github address: https://github.com/qq449245884/vue-okr-tree In addition to ordinary objects, arrays are ...

Posted by KDragon on Thu, 21 Apr 2022 03:06:36 +0300

CSS selector summary

element selector element { style properties } example: span { background-color: skyblue; } ID Selector #id_value { style properties } example: #identified { background-color: skyblue; } ID cannot be repeated. It can only be used once class selector Similar to id, but * * * class can be repeated*** .class_name { style proper ...

Posted by BRUUUCE on Tue, 19 Apr 2022 19:59:07 +0300

Method for realizing horizontal and vertical centering

In normal development, we often encounter the need to center the content horizontally and vertically. Here are some common methods. Flex It is the most common way to set the horizontal and vertical center of an element through the flex attribute. Flex layout is a very popular layout method at present. For flex layout, you can see Ruan Yifeng' ...

Posted by brettpower on Tue, 19 Apr 2022 01:00:57 +0300

JavaScript - array object

catalogue πŸ“ What is an array? πŸ“ Two ways to create arrays πŸ‡ Array() constructor to create an array πŸ‡ Create an array literal πŸ“ Two ways to detect whether it is an array πŸ‡ instanceof operator πŸ‡Array.isArray()Β  πŸ“ Three ways to traverse an array πŸ‡ for loop πŸ‡Β  forΒ  in πŸ‡Β  forEach() πŸ‡ map() mapping πŸ‡ forEach() sum πŸ‡ Ra ...

Posted by jocknerd on Mon, 18 Apr 2022 21:58:41 +0300

How to realize HTML5 animation page?

HTML5 animation implementation HTML5 animation can be implemented in the following two ways. CSS3 animation Animation is the effect of gradually changing elements from one style to another. You can change any style any number of times. Specify the time of change by percentage, or use the keywords "from" and "to", which ar ...

Posted by kaspari22 on Mon, 18 Apr 2022 13:08:34 +0300

[Liu Jian] JavaScript array de duplication method

JavaScript array de duplication methodAuthor: Abbott Liu (Liu Jian)Education: GarrisonExample: remove duplicate elements from the following array (take multiple data types as an example)const arr = [0, 1, 2, 3, 5, 5, 6, 6, 6, 7, 9]1. indexOf method using arrayCreate a new empty array, traverse the array that needs to be de duplicated, and store ...

Posted by samtwilliams on Mon, 18 Apr 2022 04:23:17 +0300

You may not know the transition skills and details

In CSS, the transition attribute is used to specify the transition effect to be added to one or more CSS attributes. The most common usage is to add A transition to an element so that when an attribute changes from state A to state B, it is no longer very direct and abrupt, but with A gap animation. for instance: <div></div> Copy ...

Posted by sriusa on Sat, 16 Apr 2022 03:53:22 +0300

Application of CSS rem and em

target γ€€γ€€ Achieve different font sizes in the same panel as shown in the figure. Β  realization Implementation using px Usually, a fixed font size may be specified separately, and the code may be as follows: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible ...

Posted by craigtolputt on Sat, 16 Apr 2022 01:56:22 +0300

vue basic syntax

1. Interpolation expression {{ ,,, }} Variable names and objects can be written in braces Properties, etc., and js statements can also be written 2. Variables are displayed on the interface v-text: v-html: The difference between the two is that v-text treats the content as plain text, and v-html treats the HTML tag as HTML code For exa ...

Posted by richierich on Fri, 15 Apr 2022 19:28:45 +0300

Introduction to Web APIs, DOM tree, case: imitating JD to display the password, get getElementsByTagName through the new method in HTML5, add the method of getting elements in H5, operate elements, and change the content of operation elements

Introduction to Web APIs 1. Basic relevance between web APIs and JS 1.1 composition of JS ECMAScript,JS syntax, DOM page document object model, BOM browser object model 1.2 JS foundation stage and Web APIs stage JS basic stage We are learning the basic syntax specified in ECMAScript standard Students are required to master the basic gramma ...

Posted by coco777 on Fri, 15 Apr 2022 08:44:41 +0300