gpt4 book ai didi

css - 将图像缩放到屏幕尺寸 sencha touch2

转载 作者:行者123 更新时间:2023-11-28 13:35:56 25 4
gpt4 key购买 nike

这是我的代码:代码:

 {                xtype: 'tabpanel',
docked: 'top',
height: 752,
width: '100%',
activeItem: 1,
items: [
{
xtype: 'container',
title: 'MyCar',
items: [
{
xtype: 'container',
maxWidth: '100%',
width: '100%',
items: [
{
xtype: 'image',
docked: 'top',
height: 407,
html: '',
id: 'imgCar',
padding: '0 0 0 510',
style: 'margin: 0px auto; width: 50%;background-size: auto;',
src: 'http://localhost/car.jpg'
}
]
},
{
xtype: 'dataview',
height: 297,
html: ' <table id="tableConsumptions"> <tr> <td id="consumptionsCol">val</td></tr> </table>',
width: '100%',
itemTpl: [
''
]
}
]
},
{

我有一个图像容器,我想调整图像尺寸以适应屏幕尺寸,并对其进行缩放。怎么可能?

提前致谢。

最佳答案

您可以尝试使用此函数来获取视口(viewport)的高度和宽度。

Ext.viewport.getWindowHeight( );
Ext.viewport.getWindowWidth( );

关于css - 将图像缩放到屏幕尺寸 sencha touch2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12989959/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com