JS Supersized plugin - images cutting off at edge of viewport

百般思念 提交于 2019-12-06 15:58:28
Jason Paul

I figured out one way to fix it with iPhone/iPad css media queries. It's probably not the best way, more like putting tape on it so it will hold together. But it works so I'm happy:

/*Fix Supersized on iOS*/

/* iPad [portrait + landscape] */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
#supersized { margin-left:0;}
}
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait) {
#supersized { width:110% !important;}
}


/* iPhone [portrait + landscape] */
@media only screen and (max-device-width: 480px) {
#supersized { margin-left:0; }
}

The issue is from the common css that set your image all base on "max-width:100%" Check your css reset if there is something img { max-width: 100%; }

The supersized official has a solution for the file "supersized.3.2.7.js": https://github.com/buildinternet/supersized/issues/103

If you can not solve it by following the official solution, try add this in your supersized css:

#supersized img { max-width: none; }

this tricky is by http://blog.valderama.net/node/30

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!