高度灵活的放大器清单 [英] amp-list with flexible height to a max

查看:54
本文介绍了高度灵活的放大器清单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想提供一个列表,该列表将随文本框的输入而变化.该列表将提供该搜索查询的结果.我正在为此使用amp-list.

I want to provide a list which will vary with the input of a text box. This list will provide the results for that search query. I am using amp-list for this.

我希望列表高度可以调整为结果数(此处应使用flex-item即可).但我希望列表的最大高度为例如500px,没有更多

I want the list height to adjust to the number of results (flex-item should be fine here). But I want the list to have a max height of e.g. 500px and no more

这可能吗?非常感谢

推荐答案

动态尺寸调整目前正在研究中:请参见

Dynamic resizing is currently in the works: see this thread on GitHub - although not sure if this applies in your current situation. Are you able to provide the code or a link to what you're currently working on?

要通过滚动溢出完成最大高度,请在amp-list周围放置一个容器div.像下面这样.

To accomplish the max-height with an overflow of scroll, put a container div around the amp-list. Something like below.

div#list-container {
  max-height: 500px;
  overflow: scroll;
}

<div id="list-container">
  <amp-list>
  </amp-list>
</div>

这篇关于高度灵活的放大器清单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆