zswang / h5psd Goto Github PK
View Code? Open in Web Editor NEWConverting PSD files into mobile page
Home Page: http://jhtmls.com/h5psd/
Converting PSD files into mobile page
Home Page: http://jhtmls.com/h5psd/
我有一个40M的PSD
生成后光image文件夹就有10M
这才是一个移动端页面,这要是放在移动端可怎么放,,, 加载慢死了
转出的图层,坐标有偏差,字体样式也不一样
在 Window 系统中生成的图片 URL 分隔符是反斜杠().
background:url(images\107957.png) no-repeat;
这会造成无法加载背景图片, img 中包含的 URL 也一样有反斜杠, 但浏览器似乎有容错机制.
<img class="layer" src="images\c334bf.png" style="left:48px;top:53px;" width="104" height="106">
分析代码 URL 错误是由于使用了兼容系统的路径拼接造成的
image = path.join(images, flag.slice(1, 7) + '.png');
Linux 和 Window 分别采用了不同的路径分隔符(正斜杠和反斜杠), 因此会生成的不同的 URL.
d:\window\b\c
root/linux/b/c
为了避免跨平台问题, 还是直接拼接 URL 好了
image = images + '/' + flag.slice(1, 7) + '.png';
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.