【问题标题】:Spotify standardized track listing setting height of are before scroll bar appears滚动条出现前的Spotify标准化曲目列表设置高度
【发布时间】:2012-02-14 20:39:01
【问题描述】:

使用类似sn-p的代码:

sp = getSpotifyApi(1);
var models = sp.require("sp://import/scripts/api/models");
var tpl = new models.Playlist();
var tempList = new views.List(tpl);
$(tempList.node).appendTo(document.getElementById("tracks"));

this post 中所述,如何使用提供的 Spotify 模型更改默认的<div> 显示曲目的大小?

我希望能够设置它,以便在元素大小为 300 像素而不是默认的 600 像素时出现滚动条。

看看this API,似乎没有一个简单的方法可以做到这一点。

【问题讨论】:

    标签: javascript html spotify


    【解决方案1】:

    您可以使用 css 设置 max-height 属性。

    .sp-list {
        max-height: 300px;
    }
    

    【讨论】:

      猜你喜欢
      • 2018-02-19
      • 2012-01-26
      • 1970-01-01
      • 1970-01-01
      • 2012-12-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多