当我在 gtmetrix 上分析我的网站时,我可以看到我在我的网站中包含的用于增加 facebook 的 facebook likebox iframe 喜欢 gtmetrix 分析要求指定图像尺寸。
正如我在检查图像上的元素时在 facebook css 中看到的那样,指定的宽度和高度为 50px。
任何人都可以为此提出一些解决方案。
这是 gtmetrix 报告:
http://profile.ak.fbcdn.net/hprofile-ak-ash1/t5/1075891_1447553848794414_2054094003_q.jpg (Dimensions: 50 x 50)
http://profile.ak.fbcdn.net/hprofile-ak-ash2/t5/1117019_100001688588210_43083615_q.jpg (Dimensions: 50 x 50)
http://profile.ak.fbcdn.net/hprofile-ak-frc1/t1/c25.0.81.81/s50x50/252231_1002029915278_1941483569_s.jpg (Dimensions: 50 x 50)
http://profile.ak.fbcdn.net/hprofile-ak-prn2/t5/1086379_100007611906546_1473945810_q.jpg (Dimensions: 50 x 50)
http://profile.ak.fbcdn.net/hprofile-ak-prn2/t5/1086844_100002168445689_1856954293_q.jpg (Dimensions: 50 x 50)
http://profile.ak.fbcdn.net/hprofile-ak-prn2/t5/211653_100004667589872_1354932965_q.jpg (Dimensions: 50 x 50)
http://profile.ak.fbcdn.net/hprofile-ak-prn2/t5/276037_1082183683_1868771598_q.jpg (Dimensions: 50 x 50)
http://profile.ak.fbcdn.net/hprofile-ak-prn2/t5/276384_1437164706_1527432832_q.jpg (Dimensions: 50 x 50)
http://profile.ak.fbcdn.net/hprofile-ak-prn2/t5/372083_100003129221075_1067837842_q.jpg (Dimensions: 50 x 50)
谢谢, 任何帮助将不胜感激。
最佳答案
如果你使用 facebook iframe 插件,你不能改变图像大小,即使你不能从 I-frame 访问任何对象,因为
这里我有另一种解决方案...
1. 从这里获取 XFBML 代码:http://developers.facebook.com/docs/reference/plugins/like-box/# 将 fb:like-box 重命名为 fb:fan
2.上传你的css文件到你的网站
3.将此参数添加到 fb 标签:profile_id="ID OF YOUR PAGE"css="http://example.com/css/your-cutom-style.css?1"
关于html - Facebook Like Box 指定图像尺寸,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21716372/