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
//生成URL | |
const searchParams = new URLSearchParams(); | |
searchParams.set('foo', 'bar'); | |
searchParams.set('hello', 'world'); | |
const searchParams = new URLSearchParams([ | |
['foo', 'bar'], | |
['hello', 'world'], | |
]); |
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
<div class="rainbow"> | |
<p>This demo uses a real border with <code>border-image</code>, a background, and finally Houdini to animate.</p> | |
</div> | |
<div class="warning"> | |
<p>⚠️ Your browser does not support <a href="https://web.dev/css-individual-transform-properties/">@property</a> so the animation won’t work<br />Please use Chrome.</p> | |
</div> | |
<style> | |
:root { |
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
// 基本 | |
class PonyComponent extends HTMLElement { | |
constructor() { | |
super(); | |
console.log("I'm a pony"); | |
} | |
connectedCallback() { | |
this.innerHTML = '<h1>General Sola</h1>'; | |
} | |
} |
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> | |
div { | |
margin: 20px; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>Get Dimensions</h1> |