大佬教程收集整理的这篇文章主要介绍了css – 在将ipad从纵向旋转到横向时,Div保持相同的宽度,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
肖像:
从纵向旋转到横向后:
这是我用于该div的CSS:
nav {BACkground-image: linear-gradient(bottom,rgb(0,0) 15%,rgb(51,51,51) 69%); BACkground-image: -o-linear-gradient(bottom,51) 69%); BACkground-image: -moz-linear-gradient(bottom,51) 69%); BACkground-image: -webkit-linear-gradient(bottom,51) 69%); BACkground-image: -ms-linear-gradient(bottom,51) 69%); BACkground-image: -webkit-gradient( linear,left bottom,left top,color-stop(0.15,0)),color-stop(0.69,51))); border-top: 1px solid #000; text-align: center; position: fixed; bottom: 0px; left: 0px; width: 100%; height: 51px; color:#CCc; font-size:11.3px; font-weight:bold; overflow: hidden; margin: 0 auto 0;}
<Meta name="viewport" content="width=device-width,user-scalable=no,initial-scale = 1.0">
至
<Meta name="viewport" content="initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
哪个工作,但下次不会,尽管基本上是相同的结构…这次,我不得不使用媒体查询,所以在CSS中,我将页脚设置为position:fixed; bottom:0; width: 100%
但遵循它:
@media screen and (max-device-width: 480pX) and (orientation:landscapE) { #navbar{width:480px;} #foot{width:480px;} } @media screen and (min-device-width: 481pX) and (orientation:landscapE) { #navbar{width:1024px;} #foot{width:1024px;} }
以上是大佬教程为你收集整理的css – 在将ipad从纵向旋转到横向时,Div保持相同的宽度全部内容,希望文章能够帮你解决css – 在将ipad从纵向旋转到横向时,Div保持相同的宽度所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。