scroll-view x 问题的解决方案
发布于 5 年前 作者 pwu 19686 次浏览 来自 问答

呵呵,第一次开发小程序……

呵呵,用了一下 scroll-view scroll-x 特性,也就是horizental scroll

呵呵,按文档教的,自己码了一遍

呵呵。

按文档代码copy了一遍

呵呵。

于是就来到论坛了。

最终的解决方案,

<scroll-view class=“scroll-view_H” scroll-x>

 <view id=“green” class=“scroll-view-item_H bc_green”></view>

 <view id=“red”  class=“scroll-view-item_H bc_red”></view>

 <view id=“yellow” class=“scroll-view-item_H bc_yellow”></view>

 <view id=“blue” class=“scroll-view-item_H bc_blue”></view>

</scroll-view>

.scroll-view_H {

 display: block;

 height: 100px;

 width: 300px;

 border: solid 1px black;

 white-space: nowrap;

}

.scroll-view-item_H {

 display: inline-block;

 width: 100px;

 height: 100px;

 background-color: red;

 margin: 5px;

}

可以了。

不过,呵呵。

做过Adoeb Flex开发的同学都知道,mxml的标签语法用到酸爽,组件各种玩。

张xiao龙并不懂开发这是真的,不然SDK这个鸟样他不窝火?

呵呵,也许不该叫SDK呢,充其量就是玩具。

回到顶部