简体   繁体   中英

Full image in Background in a vBox in Flex

I was wrote the following code to set the background image in one vBox.

vBox.setStyle("backgroundImage", "PreviewBackground.png");
vBox.setStyle("backgroundAttachment", "fixed");

Where the height and width of vBox was 250 x 350 and the height and width of background image was 400 x 400. The problem is that the background image doesn't show the full image. The image has cropped. How can i show the full image as a background image?

Thanks in advance.

vBox.setStyle("backgroundSize", "100%");

签出Container类的backgroundSize样式

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM