简体   繁体   English

Windows Phone 8图像比视口更宽

[英]Windows phone 8 images are wider than the viewport

I've been trying to solve an issue that only happens on Windows phone 8. They use as a browser IE10. 我一直在尝试解决仅在Windows Phone 8上发生的问题。它们用作浏览器IE10。 In many responsive design projects I've checked that all the mobile phones work correctly except this mobile phone and it's browser. 在许多响应式设计项目中,我检查了除该手机及其浏览器以外的所有手机均能正常工作。

The issue 问题

The images are bigger than the viewport itself making the image overflow by the right side of the screen. 图像大于视口本身,使图像在屏幕右侧溢出。 This overflow creates an uncomfortable scrolling in it's x-axis. 此溢出会在x轴上产生不舒服的滚动。

Possible solutions which did not work for me 可能对我不起作用的解决方案

Matt stow solution 马特·斯托的解决方案

CSS tricks solution CSS技巧解决方案

I'm testing with a nokia lumia 925 and a nokia lumia 520. If I apply this solution they both have different layouts. 我正在使用诺基亚lumia 925和诺基亚lumia 520进行测试。如果应用此解决方案,它们的布局都将不同。 Especially the nkia 925 as it has a big resolution the media queries act strangely, as it was a tablet. 尤其是nkia 925,因为它具有高分辨率,因此它是一台平板电脑,因此媒体查询的行为异常。

Does anybody have a clear and working solution which does not break other devices layout? 是否有人有一个清晰可行的解决方案,并且不会破坏其他设备的布局?

Just yesterday i had the same Problem and yes i visited the same pages like you. 就在昨天,我遇到了同样的问题,是的,我像您一样访问了相同的页面。 I just added an 我刚刚添加了一个

.im_the_parent_class_of_the_image {
   overflow:hidden
 }

to the parent class/element of the image and it still works fine for me and no other browser was affected. 到图片的父类/元素,对我来说仍然可以正常使用,并且没有其他浏览器受到影响。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM