简体   繁体   English

Spotify iFrame无法在Bootstrap模式下正确显示?

[英]Spotify iFrame not displaying correctly in Bootstrap modal?

I am attempting to input a Spotify playlist into a Bootstrap Modal, but instead of being a "Large" button, it is a "Compact" button. 我试图将Spotify播放列表输入到Bootstrap模式中,但是它不是“大”按钮,而是“紧凑”按钮。 It is displaying this way in the modal: 它在模态中以这种方式显示: 在此处输入图片说明

And the code for the bootstrap and iframe is 引导程序和iframe的代码是

 <!-- Modal -->
<div id="spotify_player" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Spotify Player</h3>
  </div>
  <div class="modal-body">
    <iframe src="https://embed.spotify.com/?uri=spotify:user:1210474735:playlist:1u4MR4ER329f64KjsRrcnA" width="445" height="525" frameborder="0" allowtransparency="true"></iframe>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
    <button class="btn btn-primary">Save changes</button>
  </div>
</div>

And on the src of the iframe displays as: iframesrc上显示为: 在此处输入图片说明

Which is how it should. 应该怎么办。 What do I need to do to get the first image having the playlist/"Long" button like the second one? 我要怎么做才能让第一张像第二张一样具有播放列表/“长”按钮的图像? Thanks. 谢谢。

Bootstrap's hide class will set display style to none, which hides the iframe as well. Bootstrap的hide类会将显示样式设置为none,这也将隐藏iframe。 This will cause the Play button to be compact, regardless of the width and height ratio of the iframe. 无论iframe的宽高比如何,这都会使“播放”按钮紧凑。

It's understandably not the expected behaviour of the Spotify Play button, and I've filed a bug report so that the people closest to the code can take a look at it. 可以理解,这不是Spotify播放按钮的预期行为,我已经提交了一个错误报告,以便最接近该代码的人员可以查看它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM