【文件属性】:
文件名称:dpi-aware-image:DPI感知图像CustomElement
文件大小:1.97MB
文件格式:ZIP
更新时间:2021-05-06 20:54:03
png dpi custom-elements img JavaScript
dpi感知图像
一个img元素,它通过考虑源png图像的DPI确定自己的物理宽度和高度。
安装
$ npm install @daiiz/dpi-aware-image
发展
$ npm install
$ npm run build
$ npm run demo
打开
用法
< style >
/* Optional */
dpi-aware-image {
display : inline-block;
--max-width : 100 % ;
--max-height : 300 px ;
}
</ style >
< dpi src =' /demo/dist/icon.png '> dpi>
演示版
【文件预览】:
dpi-aware-image-master
----.babelrc(70B)
----package.json(1KB)
----package-lock.json(164KB)
----static()
--------mac_retina.png(262KB)
--------mac.png(33KB)
--------mac_2.png(11KB)
--------mac_retina_2.png(846KB)
--------mac_retina_2_e9407ea76a0b412308cb0caf546582ae.png(846KB)
----src()
--------index.js(3KB)
----.gitignore(1KB)
----demo()
--------server.mjs(377B)
--------index.html(2KB)
--------dist()
--------src()
--------demo.html(880B)
--------vs.html(2KB)
--------gyazo.html(2KB)
----README.md(752B)