FireFox扩展 在XUL的tabbox标签中引入一个网页

tabbox是多页签的容器
tabs中的tab是用来表示页签的头部
tabpanels下的tabpannel是页签的内容
tabs中元素顺序与tabpannel元素顺序对应

引入网页在tabpanel中使用browser也可以使用iframe

   <tabbox id="tab_list" flex="1" >
<tabs>
<tab label="javaeye"/>
<tab label="网易" />
</tabs>
<tabpanels class="tps" flex="1">
<tabpanel>
<browser id="page_content" type="content" flex="1" src="http://www.iteye.com" />
</tabpanel>
<tabpanel>
<browser id="page_content" type="content" flex="1" src="http://www.163.com" />
</tabpanel>
</tabpanels>
</tabbox>


上面代码中flex属性,非常重要,如果没有这个属性显示会有很大问题
官网对flex的解释:
flex
Type: string (representing an integer)
Indicates the flexibility of the element, which indicates how an element's container distributes remaining empty space among its children. Flexible elements grow and shrink to fit their given space. Elements with larger flex values will be made larger than elements with lower flex values, at the ratio determined by the two elements. The actual value is not relevant unless there are other flexible elements within the same container. Once the default sizes of elements in a box are calculated, the remaining space in the box is divided among the flexible elements, according to their flex ratios. Specifying a flex value of 0 has the same effect as leaving the flex attribute out entirely.

效果如附件所示
[img]http://dl.iteye.com/upload/attachment/338755/78c2affc-3c6a-3e4e-8663-58beba33ae77.jpg[/img]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值