Phonegap中的响应式图像

时间:2013-04-24 18:24:08

标签: php image cordova responsive-design

我希望在我的Phonegap应用程序中有响应式图像,但是如何处理来自mysql数据库和php作为服务器端的图像。

1 个答案:

答案 0 :(得分:-1)

您需要将一些CSS应用于所述图像以使它们变得响应,如果图像是从img src或mysql数据库加载的,则无关紧要。< / p>

试试这个CSS:

img {
    max-width: 1000px;  //upper-bound
    min-width: 320px;  //lower-bound
    width: 100%;  //set the image to be the width of whatever the screen width is now
}