作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 Google 自定义搜索 API 搜索要在我的网站中显示的图像。但缩略图太小,我找不到控制缩略图大小的方法。以下是我的查询的回复:
{
"kind": "customsearch#result",
"title": "Big Ben Street London United Kingdom Photo Shared By Halsy16 ...",
"htmlTitle": "Big Ben Street \u003cb\u003eLondon United Kingdom\u003c/b\u003e Photo Shared By Halsy16 \u003cb\u003e...\u003c/b\u003e",
"link": "http://www.fansshare.com/photos/london/big-ben-street-london-united-kingdom-784722294.jpg",
"displayLink": "www.fansshare_com",
"snippet": "Robert Pattinson's new London",
"htmlSnippet": "Robert Pattinson's new \u003cb\u003eLondon\u003c/b\u003e",
"mime": "image/jpeg",
"image": {
"contextLink": "http://www.fansshare_com/gallery/photos/10677077/big-ben-street-london-united-kingdom/",
"height": 640,
"width": 1024,
"byteSize": 80611,
"thumbnailLink": "https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcSZJRKQ-yIiSt1FCeYdBKLUEft54xHJo095_r9-rN8OrILnOZPnJZvcwNsG",
"thumbnailHeight": 94,
"thumbnailWidth": 150
}
有人可以告诉我是否有办法获得更大的缩略图吗?或者是否有其他方法可以像 Google 图片搜索一样显示搜索结果?非常感谢!
最佳答案
我假设您正在使用 Google Custom Search API因为图像 API 已被弃用。
无法告诉 Google 提供更大的缩略图尺寸 AFAICS,但您有两种可能的解决方法:
link
查询参数)(但这可能很危险,因为您必须避免巨大和过小的图像)请务必尝试 api Explorer及其参数。
关于thumbnails - 更改 Google 自定义搜索 API 结果中的缩略图大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28212414/
我有一个具有可变数量子元素的固定大小的 div。我不知道 children 的大小。目标是缩小它们以适合父级。 例子: .parent { width: 100px; height: 100p
我是一名优秀的程序员,十分优秀!