CSS for getting started with the web
1. Role of CSS
View the following code
If you use attributes in HTML tags to define styles, each element has different attribute definitions for styles!
<body bgcolor="silver" text="bule">
<h2>h2 text</h2>
<hr color="red"/>
Some Text here.
</body>
<style type="text/css">
body{
background-col ...
Posted by HektoR on Sun, 24 Oct 2021 19:04:30 -0700
Observer mode and publish subscriber mode in vue
Observer mode
The target object and the observer object are interdependent. The observer observes the state of an object. If the state of the object changes, it will notify all observers who depend on the object,
1. Target Subject, owning method: Add / delete / notify Observer;
2. Observer object Observer, owning method ...
Posted by thewitt on Sun, 24 Oct 2021 18:41:07 -0700
Mobile terminal adaptation
Common solutions to mobile terminal layout are:
1.flex flexible layout
1) The height is fixed, the width is adaptive, and px is used as the unit of elements.
2) As the screen width changes, the page will also change. The effect is similar to the fluid layout of the PC page. When the width needs to be adjusted, just use the responsive layout ...
Posted by jdlev on Sun, 24 Oct 2021 16:32:12 -0700
JavaScript implements dynamically added elements to add click events
In the process of page development, it is often necessary to dynamically add elements and bind related events to this element. In this case, it is generally necessary to add related attributes to the elements and then write the event functions of these elements. How do dynamically added elements bind events?
Native JavaScript
There are two ma ...
Posted by ldougherty on Sun, 24 Oct 2021 16:12:01 -0700
Some thoughts and best practices on react-derived States
Derived state of React
Prior to react 16.3, the only way to update the state s inside a component when props changed was to use componentWillReceiveProps followed by a getDerivedStateFromProps.
There are two scenarios when using a derived state:
Manage a copy of the props passed by the parent component in the state of the child componen ...
Posted by macinslaw on Sun, 24 Oct 2021 09:27:00 -0700
01 Vue template syntax
an introduction to
What is Vue?
Vue (pronunciation / vju) ː/, view) is a progressive framework for building user interfacesvue's core library only focuses on view layers, which is not only easy to start, but also easy to integrate with third-party libraries or existing projects
Rendering helloworld onto a page using Vue
Directives (custo ...
Posted by Revan on Sun, 24 Oct 2021 05:31:58 -0700
Use of HTML5 canvas
What is canvas
In web pages, we also call the special area for drawing graphics as "canvas". Web designers can draw their own graphic styles in this area.
How to use canvas
1. Create canvas
Use the canvas tag in HTML5 to create a canvas in a web page. Basic syntax format:
<canvas id="Canvas name" width="numerical value" he ...
Posted by ShawnK on Sun, 24 Oct 2021 04:45:57 -0700
TypeScript data type, arbitrary value, type inference, union type, interface (Interfaces, optional attribute?:, arbitrary attribute, read-only attribute)
TypeScript (II) data type, arbitrary value, type inference, joint type, interface (Interfaces, optional attribute?:, arbitrary attribute, read-only attribute)
website: https://ts.xcatliu.com/
1. Original data type
There are two types of JavaScript: raw data type( Primitive data types )And Object types.
Raw data types include Boolea ...
Posted by contra10 on Sun, 24 Oct 2021 00:27:58 -0700
HTML notes - tags and hyperlinks
This blog is based on the video of station B up@ meeting crazy God and the documents on W3school's official website. There will be some screenshots of the video, the concept of the official website, and my personal notes Note: the screenshots in the blog post and the pictures found on the network are not watermarked with csdn. Only my own pictu ...
Posted by epimeth on Sat, 23 Oct 2021 23:33:17 -0700
Deep copy of objects in JS
In JS, the general = sign passes references to objects / arrays and does not really copy an object. How to make a deep copy of the object? If you have questions about this, this article may help you
1, The difference between object reference, shallow copy and deep copy
The object reference passing of js is very simple to understand. Refer to ...
Posted by www.WeAnswer.IT on Sat, 23 Oct 2021 23:26:47 -0700