我试图破解我的方式进入tumblr photoset,我想我找到了最大700显示大小的修复。Tumblr Photoset
让我们说,这是由{Photoset-700}产生的正常的iframe:
<iframe class="photoset" scrolling="no" frameborder="0" height="1048" width="700" style="border:0px; background-color:transparent; overflow:hidden;" src="http://www.georgefratila.ro/post/20314734048/photoset_iframe/esssk/tumblr_m1tp5634Si1qzc7t7/700/false"></iframe>
有没有办法来改变iframe的宽度,改变src网址的最后一部分,放大时保持宽高比?
宽度= “700” 改变这个值到860 SRC = “http://www.georgefratila.ro/post/20314734048/photoset_iframe/esssk/tumblr_m1tp5634Si1qzc7t7/700/false” 改变的最后部分src/700/false转换为/ 860/false
我觉得我看到它在网站上用jquery制作,但我不记得名字,我会研究我的历史,也许我会找到它。
感谢您的帮助。
Edit.1 我想我排序的几乎一切:
$('iframe.photoset').each(function() {
$(this).attr("width", function(index, old) {
return old.replace("700", "860");
});
$(this).attr("src", function(index, old) {
return old.replace("/700/false", "/860/false");
});
});
,我现在唯一的问题是高度,它不规模,以适应的iframe。