This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
.fade { | |
display: block; | |
background: red; | |
margin-bottom: 50px; | |
width: 100%; | |
height: 150px; | |
opacity: 0.2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
// original gist : https://gist.github.com/csswizardry/ad11c8dc6e1bc20dd602312196974de6 | |
const styleElement = document.createElement("style"); | |
styleElement.innerHTML = ` | |
/** | |
* Tier 1 – Dotted | |
*/ | |
* { outline: 2px dotted purple; } | |
* * { outline: 2px dotted blue; } | |
* * * { outline: 2px dotted green; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function Wait(time) { | |
return new Promise(resolve => { | |
setTimeout(resolve, time); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"str1=hello,str2=world".split(",") | |
.map(str => str.split("=")) | |
.map(arr => {let tmp = {};tmp[arr[0]]=arr[1];return tmp;}) | |
.reduce((a,b) => ({...a, ...b})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<style> | |
.bg-lz-load { | |
background: white; |