clone-element:使用样式克隆HTML元素

时间:2021-05-24 13:59:09
【文件属性】:
文件名称:clone-element:使用样式克隆HTML元素
文件大小:28KB
文件格式:ZIP
更新时间:2021-05-24 13:59:09
TypeScript 克隆元素 使用样式克隆HTML元素。 安装 npm i -save clone-element 用法 import cloneElement from 'clone-element' document . body . appendChild ( cloneElement ( document . querySelector ( 'h1' ) ) 特点和局限性 :check_mark_button: 克隆样式。 :hollow_red_circle: 本地输入的默认样式可能会意外地起作用,因为它们通常依赖于浏览器的私有CSS扩展,因此,在某些情况下,计算出的样式将变得无用。 :check_mark_button: 伪元素的支持样式(在下面列出)。 ::after ::before ::first-letter ::first-line ::marker ::placeholder :hollow_red_circle: 仅适用于Firefox。 Chrome / Safari无法为::placehold
【文件预览】:
clone-element-master
----.gitignore(18B)
----tsconfig.json(652B)
----README.md(1KB)
----rollup.config.js(983B)
----test()
--------index.css(444B)
--------index.js(600B)
--------index.html(3KB)
----LICENSE(1KB)
----package.json(857B)
----src()
--------util.ts(324B)
--------types.ts(781B)
--------video.ts(721B)
--------input.ts(716B)
--------canvas.ts(181B)
--------id.ts(290B)
--------element.ts(845B)
--------index.ts(1KB)
--------style.ts(5KB)
--------context.ts(750B)
----.npmignore(38B)
----.editorconfig(147B)
----.eslintrc.js(318B)
----package-lock.json(54KB)

网友评论