簡體   English   中英

Flex 3使用圖像作為邊框

[英]Flex 3 Using an image as a border

我正在使用自定義容器,因此需要該容器的邊框。 我有一個15x15的圖像,用於創建9切片的邊框皮膚。 我遇到的問題是邊框皮膚的外觀不像我希望的那樣。

這是適當的皮膚。

理想情況下,我應該有一個透明框,其周圍有5個像素的邊框。

這是我當前的測試代碼:

CSS代碼:

Box
 {
borderSkin: Embed(source="15x15.png",
            scaleGridLeft="5",
            scaleGridTop="5",
            scaleGridRight="10",
            scaleGridBottom="10");
 }

MXML代碼:

<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Style source="MainTest.css"/>

<mx:Box id="tw" width="400" height="400">

</mx:Box>
</mx:WindowedApplication>

嘗試這個 :

Box{
    background-image: Embed("15x15.png",
       scaleGridTop="5", 
                   scaleGridBottom="10", 
                   scaleGridLeft="5", 
                   scaleGridRight="10");

    background-size:"100%";
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM