Why aren't jQuery mobile icons clipped properly in high resolution devices?

做~自己de王妃 提交于 2019-12-12 02:55:56

问题


I have a web application that targets various devices including iPad 1,2,3. I use jQuery mobile to customize the UI. I have a a jquery mobile . The image inside the checkbox is the 'home' and the 'search' image in iPad 3. It should have been the 'checked' and the 'unchecked' image however, like the way it works in iPad 1 and 2. The resolution of iPad 3 is not the same as iPad 1 and 2 which is why this happens. So how can I fix this having a common solution for all devices?


回答1:


I found an answer to this.

In jquery mobile css there is a separate style for HD Retina. There you will find

-moz-background-size: 864px 18px;
-o-background-size: 864px 18px;
        -webkit-background-size: 864px 18px;
        background-size: 864px 18px;

Change the 864 to 776px. According to background image rules, the size specified here should half of the actual image. The actual image is 1552px. So half of this 776px. But jquery mobile code says 864, which is wrong. -moz-background-size: 776px 18px; -o-background-size: 776px 18px; -webkit-background-size: 776px 18px; background-size: 776px 18px; is the correct code.

FYI: https://github.com/jquery/jquery-mobile/issues/2224



来源:https://stackoverflow.com/questions/16453714/why-arent-jquery-mobile-icons-clipped-properly-in-high-resolution-devices

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