Analysis of image download in browser
As a result of the project demand reason, looked up in the browser picture download related material earnestly, summarized several parts.
1. Save SVG as PNG
In IE, it seems that SVG can only be saved locally as PNG by right clicking SVG.
In non IE browser, it can be realized by the following code:
let serializer = ...
Posted by adamski on Sat, 04 Jan 2020 12:29:43 +0100
Imitating bootstrap tagsinput autocomplete function
Demand analysis:
1. Independent function, that is, a page can have multiple input boxes with the same function
2. There are various functional requirements, and there are differences in the maximum number and data form
3. After completion of input, data interaction with the background (pass id)
4. Click delete or delete to ...
Posted by iacataca on Wed, 01 Jan 2020 06:33:49 +0100
Implementation of special effect of carousel carousel with native JS
It's about this son:
First of all, let's make a simple layout (emm... Let's do something about it, anyway, it's mainly made up of js)
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <meta http-eq ...
Posted by USMarineNCO on Thu, 26 Dec 2019 19:00:16 +0100
Baidu written test 2018
Digression
First of all, I want to Tucao, csdn is dying. Copying the posting text is disgusting. I copy my blog, and I quote.
So I decided to change places, later github (bias code) and gitee (emphasis on knowledge) will be updated frequently.
subject
Is to let you use es5 to write code, after the implementation of click. I ...
Posted by johnie on Fri, 20 Dec 2019 17:41:10 +0100
Use of component data of Vue.js
Official website link: https://cn.vuejs.org/v2/guide/components.html
Reference link: http://www.cnblogs.com/keepfool/p/5625583.html
Teaching video reference link:
https://ke.qq.com/webcourse/index.html#cid=320654&term_id=100380571&taid=2520179435431054&vid=t1428m0ykhd
Most of the options passed in to the Vue con ...
Posted by dannydefreak on Wed, 18 Dec 2019 21:25:33 +0100
sass - nested rule
I. Basic nesting rules
A given rule block can contain attributes like normal CSS and nest other rule blocks
#content {
article {
h1 { color: #333 }
p { margin-bottom: 1.4em }
}
aside { background-color: #EEE }
}
/* After compilation */
#content article h1 { color: #333 }
#content article p { margin-bottom: 1.4e ...
Posted by TaosBill on Wed, 18 Dec 2019 21:02:12 +0100
js native image switching with thumbnail
js native image switching with thumbnail
The moveelement (elementid, final x, final_y, interval) used in this example is a code from Chapter 10 of the book "JavaScript DOM programming art (Chinese version 2)". (you can use baidu directly)
On the left is the banner image, and on the right is the thumbnail image. When the mouse slides i ...
Posted by tyr_82 on Tue, 17 Dec 2019 23:16:41 +0100
javascript implementation of "Introduction to algorithm" red black tree
I. overview
The red black tree is a balanced binary tree. This kind of tree can carry out efficient middle order traversal. By constraining the color of each node on any simple path from root to leaf, it is ensured that no path is twice as long as other paths, so it is nearly balanced. We use red black tree when it has less rotation to keep bal ...
Posted by Hotkey on Fri, 13 Dec 2019 10:56:49 +0100
JS---DOM --- common.js involved in the course
//Code to format the date
//Get the specified label object
//Get the text content of the element
//Get the text content of the element
//Get the first child element in the parent element
//Get the last child element in the parent element
//Get the previous sibling of an element
//Get the next sibling of an element
//Get all siblings of ...
Posted by zTagged on Wed, 11 Dec 2019 15:18:25 +0100
jQuery click other parts of the page to hide the drop-down menu
I. key points of development
In web pages, we usually don't use select or option to achieve the pull-down menu effect, because the style of the pull-down box is ugly and difficult to beautify, so we choose to control ul display and hide to achieve the same and tall effect, but we can't click other parts of the page like the pull-down box, and ...
Posted by lmaster on Tue, 10 Dec 2019 13:49:29 +0100