
<HTML><head>..</head><body>..<p>I am on the top of desktop page,and bottom of mobile page</p>...</body></HTML>解决方法 以灵活的方式重新排列未知高度的元素最好用FlexBox完成.虽然支持不是桌面浏览器(IE是这里的主要限制因素,支持从v10开始),大多数移动浏览器确实支持它.
http://cssdeck.com/labs/81csjw7x
@media (max-wIDth: 30em) { .container { display: -webkit-Box; display: -moz-Box; display: -ms-flexBox; display: -webkit-flex; display: flex; -webkit-Box-orIEnt: vertical; -moz-Box-orIEnt: vertical; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; /* optional */ -webkit-Box-align: start; -moz-Box-align: start; -ms-flex-align: start; -webkit-align-items: flex-start; align-items: flex-start; } .container .first { -webkit-Box-ordinal-group: 2; -moz-Box-ordinal-group: 2; -ms-flex-order: 1; -webkit-order: 1; order: 1; }} http://caniuse.com/#feat=flexbox
请注意,FlexBox可能会与其他布局方法冲突,例如典型的网格技术.设置为浮动的Flex项目可能会导致使用2009年规范(显示:-webkit-Box)的Webkit浏览器中出现意想不到的结果.
总结以上是内存溢出为你收集整理的html – 在响应式设计中将顶部元素移动到底部的最佳方式是什么?全部内容,希望文章能够帮你解决html – 在响应式设计中将顶部元素移动到底部的最佳方式是什么?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)