Skip to content

Instantly share code, notes, and snippets.

//生成URL
const searchParams = new URLSearchParams();
searchParams.set('foo', 'bar');
searchParams.set('hello', 'world');
const searchParams = new URLSearchParams([
['foo', 'bar'],
['hello', 'world'],
]);
<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 {
// 基本
class PonyComponent extends HTMLElement {
constructor() {
super();
console.log("I'm a pony");
}
connectedCallback() {
this.innerHTML = '<h1>General Sola</h1>';
}
}
@ciming
ciming / get-video-size.html
Last active March 9, 2023 17:47
Client side Javascript get video width/height before upload Ask
<html>
<head>
<style>
div {
margin: 20px;
}
</style>
</head>
<body>
<h1>Get Dimensions</h1>