在web上实现切换页面像手机APP切换一样
jethro2002 / page-switching-like-phone-app Goto Github PK
View Code? Open in Web Editor NEWPage switching like Phone App
Page switching like Phone App
目前在我的本地项目中,字体已经可以随着页面缩小而缩小,达到视觉上的体验。
但页面内的其他元素,例如img,div,或者宽度/位置属性,例如top,margin-top,padding-top...目前需要使用百分比单位来实现整体化。
我会在未来增加自动化机制。
案例:http://lujiechao.cn/
↑建议移动端设备大小访问
这是由于在页面切换后,容器高度发生改变而导致的,目前的解决方法是通过cookie记录之前浏览到的位置,然后在切换回来的时候定位到该位置。
坏处:
需要在绑定链接的时候除了输入切换至的页面外,还需要输入当前页面ID。
这是不可避免的,因为变换的css属性太多的原因。
不过我会尽量尝试缩短代码以及简化步骤来改善。
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.