Skip to content

Instantly share code, notes, and snippets.

@IronKinoko
IronKinoko / add.ts
Created October 12, 2022 05:59
next.js import esm typescript file
export const add = () => {}
@IronKinoko
IronKinoko / text-align-justify.html
Created August 18, 2021 04:58
不换行文本左右对齐在各浏览器上的适配
<!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>
.container {
width: 300px;
@IronKinoko
IronKinoko / html2canvas to pdf to zip.jsx
Last active February 6, 2023 05:38
html2canvas to pdf to zip
import html2canvas from 'html2canvas'
import jsPDF from 'jspdf'
import jszip from 'jszip'
import { saveAs } from 'file-saver'
async function print() {
const zip = new jszip()
async function gen(id, name) {
const dom = document.getElementById(id)
const canvas = await html2canvas(dom, {
scrollX: -window.scrollX,