0

I created carousel which loads many images. However, each image is overlapping to another image from different card as shown here:
card_1 card_2 card_3

As you can see in the screenshot, some part of the first image appear in the second card and so on.

This is how I put the image inside a "html" component within carousel's item:

html: '<div> <img src="'+avaImg+'" />'

Is there any way to make the image fit into the screen regardless the resolution of the phone?

4

2 回答 2

0

嗨@tukang你可以尝试创建css类,像这样,

.your_name {
   background-image: url(your_url_image);
   background-repeat: no-repeat;
   background-position: center;
}

然后把它放在你的html标签上<div class="your_name"></div>

我希望能帮助你。:)

于 2012-08-05T15:09:51.750 回答
0

为什么不在Ext.ImageSencha Touch 2 中使用组件?

然后,您可以使用styleconfig.xml 将自定义样式应用于该图像。

于 2012-08-04T18:20:26.287 回答