accordion做菜单,发现经常出现一个小的垂直滚动条,非常雅观,见下图:
经过查看源代码,发现accordion还有一个选项:
-
heightStyleType: String
-
Default: "auto"
-
-
Controls the height of the accordion and each panel. Possible values:
-
-
"auto": All panels will be set to the height of the tallest panel.
-
"fill": Expand to the available height based on the accordion
-
"content": Each panel will be only as tall as its content.
把它设置为content:
再看效果:
OK了!
--end--
阅读(3502) | 评论(0) | 转发(0) |