New CSS feature @ layer -- cascade layer

New CSS feature @ layer New CSS feature @ layer grammarPriority of non @ layer and @ layer layersAnonymous layerNested layer C in CSS refers to Cascading, that is, Cascading. Only by understanding how Cascading solves the conflict of style rules, can we accurately and quickly set the style of an element. The stacking rules are cons ...

Posted by rinkhals on Fri, 22 Apr 2022 06:37:01 +0300

The front-end layout is related to the mobile terminal layout

1, Mobile terminal layout 1. Layout concept (1) Static layout Direct use of px as a unit is not recommended and cannot adapt to the screen (2) Streaming layout Width percentage height pxThe maximum and minimum values are usually added (3) Adaptive layout Each static layout corresponds to multiple screen resolutionsUse @ media media query t ...

Posted by dreglo on Fri, 22 Apr 2022 06:06:46 +0300

[CSS box model learning]

1, What is a box model? All HTML elements can be regarded as boxes. In CSS, the term "box model" is used for design and layout. CSS box model is essentially a box that encapsulates the surrounding HTML elements, including margins, borders, padding, and actual content. The box model allows us to place elements in the space between ...

Posted by frosero on Thu, 21 Apr 2022 16:20:22 +0300

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 πŸ‡ Random array πŸ‡ ...

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