tumblr 上的 vimeo 宽度
知道问题 tumblr 将视频宽度限制为 max500,我希望它们为 700。 我已经尝试了列出的所有技巧和脚本,它们不适用于我的主题。有什么建议吗?
Know issue tumblr restricts width of videos to max500, i want them 700.
I've tried all the hacks and scripts listed, they won't work on my theme. Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这段代码是一个有用的起点,但它也没有调整嵌入标签的大小,这意味着它不适用于所有浏览器。
编辑:进一步修订,以防万一您的视频/媒体,无论嵌入其他元素中:
This code was a useful starting point, but it didn't resize the embed tag, too, which means it won't work for all browsers.
EDIT: A further revision, just in case your videos/media, whatever are embedded within other elements:
我必须对我为 Tumblr (ridiculouslyawesome.com) 设计/开发的主题做同样的事情。为了绕过 Tumblr 似乎强加的 500px 最大宽度,我想出了一个小小的 javascript hack,它可以找到页面中的所有对象/嵌入/iframe 标签,并根据主题正确调整它们的大小。此示例使用 jQuery,但您可以将其更改为您喜欢使用的任何 JS 框架。
到目前为止,在我测试过的所有浏览器中,这对于我的主题来说效果非常好。希望它也对你有用。如果您遇到任何问题,请告诉我。
瑞安
I had to do the same thing with the theme that I designed/developed for my Tumblr (ridiculouslyawesome.com). In order to get around the 500px max width that Tumblr seems to impose, I came up with a little javascript hack that finds all object/embed/iframe tags in the page and resizes them properly for the theme. This example uses jQuery, but you can alter it to whatever JS framework you prefer to use.
So far this has worked pretty good for my theme in all the browsers that I have tested it on. Hopefully it will work for you too. Let me know if you run into any issues with it.
Ryan