flex的Canvas可以和HTML的DIV一样做块状的网格布局
用到的MX标签:constraintColumns、ConstraintColumn、constraintRows、ConstraintRow
给大家说说前提情况:在做MXML布局时,要嵌套很多层级,这里面有很多问题:
1、嵌套太多层级会影响效率!
2、嵌套太多层级,代码的可读性、可维护性差!
3、嵌套太多层级是因为Canvas、Vbox、Hbox功能单一,不能满足需要,而不是必须要这样做。
好吧,来看一个MXML代码示例:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600">
<mx:constraintColumns>
<mx:ConstraintColumn id="column1" width="250"/>
<mx:ConstraintColumn id="column2" width="100%"/>
</mx:constraintColumns>
<mx:constraintRows>
<mx:ConstraintRow id="row1" height="25"/>
<mx:ConstraintRow id="row2" height="25"/>
<mx:ConstraintRow id="row3" height="100%"/>
<mx:ConstraintRow id="row4" height="35"/>
</mx:constraintRows>
<mx:Button id="topMenuCvs" label="topMenuCvs" width="100%"
top="row1:0" bottom="row1:0"/>
<mx:Button id="topButtonCvs" label="topButtonCvs" width="100%"
top="row2:0" bottom="row2:0"/>
<mx:Button id="leftNavCvs" label="leftNavCvs" height="100%"
top="row3:0" bottom="row3:0" left="column1:0" right="column1:0"/>
<mx:Button id="leftMainCvs" label="leftMainCvs" height="100%"
top="row3:0" bottom="row3:0" left="column2:0" right="column2:0"/>
<mx:Button id="footCvs" label="footCvs" width="100%"
top="row4:0" bottom="row4:0"/>
</mx:Application>
效果图:
相关文档:
超文本标记语言(HTML)5 第一次向 HTML 中引入新的元素。新的结构元素包括 aside、figure 和 section。新的内联元素包括 time、meter 和 progress。新的内嵌元素有 video 和 audio。新的交互元素有 details、datagrid 和 command。
超文本标记语言(HTML)的开发到 ......
Flex中控件组件一大堆,总结一下。
1.
用来布局的控件有 form、canvas、panel、box 等。 当然box 中又有很多了,有vbx、hbox、VDividedBox、HividedBox、Tile。 当然这些里面大体上又分为两种
一种是绝对布局、一种是相对布局(个人认为啊)。其中canvas 是只支持绝对布局的 form、box 只支持相对布局。而p ......
首先,申明本文是转载
http://blog.csdn.net/ivanmarkliu/archive/2009/07/08/4327570.aspx
,大家可以访问该链接,也可以直接阅读本文后续部分以了解
flex
事件。接下来简单谈下为何要转载此文及本人对此文的一些补充。
可以这样说 ......
Flex
引入了元数据标签的概念,大多数人都使用过的
[Bindable]
标签便是其中的
meta tag
之一,它在代码中的作用就是向编译器提供如何编译程序的信息。实际上,这些标签并没有被编译到生成的
SWF
文件中,而只是告诉编译器如何生成
SWF
文件。
adobe
官网
http://l ......
文章来源:IT工程信息网 http://www.systhinker.com/html/88/n-14088.html
应用程序安全专家表示,HTML5给开发人员带来了新的安全挑战。苹果公司与Adobe公司之间的口水战带来对 HTML 5命运的诸多猜测,尽管HTML 5的实现还有很长的路要走,但可以肯定的一点是,运用HTML ......