我正在與flex-mobile合作。爲什麼不使用flex-mobile字段應用CSS?
我創造了我的意見的文件相同的文件夾中的CSS文件:
/* CSS file */
@namespace s "library://ns.adobe.com/flex/spark";
s|Button {
height: 25px;
width: 120px;
text-shadow: 3px 3px 3px #FFF;
font-weight:bold;
color:#000;
border:1px solid #bbbbbb;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
}
然後,我將CSS我的看法:
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="Accueil" creationComplete="creationCompleteHandler(event)"
>
<fx:Style source="style.css" />
...
<s:HGroup>
<s:Button id="go" label="Continuer" click="navigator.pushView(MyNewView)"/>
<s:Button id="quit" label="Quitter" click="quitter(event)"/>
</s:HGroup> ...
的問題是,在運行時的CSS是沒有申請 !那麼如何讓CSS應用?
那麼如何將CSS應用於flex-mobile? – pheromix
@pheromix完全是你在你的問題中這樣做的方式。你只需要使用支持的樣式。 Flex按鈕樣式的列表可以在這裏找到:http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/Button.html#styleSummary – JeffryHouser