Krpano_实现收缩导航子菜单

实现代码:

<!-- 区位优势子菜单 -->
<layer
 name="quWeiYouShiChild" 
 type="container" 	
 x="26.5%" 
 y="11%"
 width="20%"
 height="0%"
 y.mobile="12%"
 x.mobile="12%"
 width.mobile="46%"
 visible="true" 
 bgalpha="1" 
 align="leftbottom" 
 bgroundedge="8"
 scalechildren="true"
 scale="0.9"
 scale.mobile="1.2"
 bgcolor="0xFFFFFF">
	
	<!-- 路网 -->
	<layer name="luwang"
	zorder="99"
	enabled="true"
	url="%SWFPATH%/plugins/textfield.swf"
	html="[font]路网[/font]" css="color:#cccccc; font-weight:bold; font-family:微软雅黑; font-size:18px; text-align:center; height:18px; padding-top:17%; line-height:18px; "
	css.mobile="color:#cccccc; font-weight:bold; font-family:微软雅黑; font-size:13px; text-align:center; height:18px; padding-top:16%;  line-height:18px; "
	scale="0.4" width="64%" width.mobile="64%" height="200%" alpha="1" 
	distorted="true"
	align="left"
	x="0%"
	x.mobile="0%"
	loader_alternative=""
	scaleflying="true"
	tx="0"
	ty="0"
	tz="0"
	bgroundedge="8"
	/>
	<!-- 教育 -->
	<layer name="jiaoyu"
	zorder="99"
	enabled="true"
	url="%SWFPATH%/plugins/textfield.swf"
	html="[font]教育[/font]" css="color:#cccccc; font-weight:bold; font-family:微软雅黑; font-size:18px; text-align:center; height:18px; padding-top:17%; line-height:18px; "   
	css.mobile="color:#cccccc; font-weight:bold; font-family:微软雅黑; font-size:13px; text-align:center; height:18px;  padding-top:16%;  line-height:18px; "
	scale="0.4" width="64%" width.mobile="64%"  height="200%" alpha="1" 
	distorted="true"
	align="left"
	x="25%"
	x.mobile="25%"
	loader_alternative=""
	scaleflying="true"
	tx="0"
	ty="0"
	tz="0"
	bgroundedge="8"
	/>
	<!-- 商业 -->
	<layer name="shangye"
	zorder="99"
	enabled="true"
	url="%SWFPATH%/plugins/textfield.swf"
	html="[font]商业[/font]" css="color:#cccccc; font-weight:bold; font-family:微软雅黑; font-size:18px; text-align:center; height:18px;padding-top:17%; line-height:18px; "   
	css.mobile="color:#cccccc; font-weight:bold; font-family:微软雅黑; font-size:13px; text-align:center; height:18px;  padding-top:16%;  line-height:18px; "
	scale="0.4" width="64%" width.mobile="64%"  height="200%" alpha="1" 
	distorted="true"
	align="left"
	x="50%"
	x.mobile="50%"
	loader_alternative=""
	scaleflying="true"
	tx="0"
	ty="0"
	tz="0"
	bgroundedge="8"
	/>
	"休闲"
	<layer name="xiuxian"
	zorder="99"
	enabled="true"
	url="%SWFPATH%/plugins/textfield.swf"
	html="[font]休闲[/font]" css="color:#cccccc; font-weight:bold; font-family:微软雅黑; font-size:18px; text-align:center; height:18px; padding-top:16%;line-height:18px; "   
	css.mobile="color:#cccccc; font-weight:bold; font-family:微软雅黑; font-size:13px; text-align:center; height:18px;  padding-top:16%;  line-height:18px; "
	scale="0.4" width="62%" width.mobile="64%"   height="200%" alpha="1" 
	distorted="true"
	align="left"
	x="75%"
	x.mobile="75%"
	loader_alternative=""
	scaleflying="true"
	tx="0"
	ty="0"
	tz="0"
    bgroundedge="8"
	/>
 
	
</layer>

<!-- 区位优势 -->
<!-- 打开导航子菜单 -->
<action name="quweiyoushiOpen">
	tween(layer[quWeiYouShiChild].height,7%);
	set(layer[skin_btn_funtion2].onclick,quweiyoushiClose());
</action>
<!-- 关闭导航子菜单 -->
<action name="quweiyoushiClose">
	tween(layer[quWeiYouShiChild].height,0);
	set(layer[skin_btn_funtion2].onclick,quweiyoushiOpen());
</action>	

在某个layer上 加上  οnclick="quweiyoushiOpen()" 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值