有没有办法用django嵌入式视频来调整嵌入式youtube播放器的大小?像这样使用常规的iframe标记是行不通的:
<iframe src="{{ video myvideo.link }}" frameborder="0" border="0" cellspacing="0" style="border-enter code here`style: none;width: 100%; height: 120px;"></iframe>
医生们也什么也没说。
发布于 2015-05-04 10:50:43
这是可能的。见文档:
http://django-embed-video.readthedocs.org/en/v1.0.0/examples.html#template-examples
从链接中:
默认大小是微小(420x315)、小(480x360)、中等(640x480)、大(960x720)和巨大(1280x960)。你可以设定你自己的尺寸:
{% video my_video '800x600' %}
此用法已在0.7版中添加。
并使用相对百分比大小:
{% video my_video '100% x 50%' %}
https://stackoverflow.com/questions/26667648
复制相似问题