Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/196.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 根据设备屏幕调整图像高度和宽度_Android_Css_Dojo_Ibm Mobilefirst - Fatal编程技术网

Android 根据设备屏幕调整图像高度和宽度

Android 根据设备屏幕调整图像高度和宽度,android,css,dojo,ibm-mobilefirst,Android,Css,Dojo,Ibm Mobilefirst,如何在不同设备的全屏上显示图像,即根据设备显示自动调整图像 我尝试了“宽度:设备宽度”选项,但没有成功。有什么帮助吗?请检查此css是否有助于您的代码 html, body { width:100%; /* this is a must */ height:100%; /* this is a must */ margin:0; padding:0; } img { width:100%; /*

如何在不同设备的全屏上显示图像,即根据设备显示自动调整图像


我尝试了“宽度:设备宽度”选项,但没有成功。有什么帮助吗?

请检查此css是否有助于您的代码

   html, body {
        width:100%; /* this is a must */
        height:100%; /* this is a must */
        margin:0;
        padding:0;
    }
    img {
        width:100%; /* this will depend on parent containers width */
        height:auto;
    }

(重新调整浏览器的宽度和高度以查看更改)

检查此css是否有助于您的代码

   html, body {
        width:100%; /* this is a must */
        height:100%; /* this is a must */
        margin:0;
        padding:0;
    }
    img {
        width:100%; /* this will depend on parent containers width */
        height:auto;
    }

(重新调整浏览器的宽度和高度以查看更改)

我找到了解决方案。我在css中遵循了“@media querys”的概念,它为我做到了这一点。

我找到了解决方案。我在css中遵循了“@media querys”的概念,它为我做到了这一点