JQuery 颜色框 : Resize very large image to given size

标签 jquery css html image colorbox

如何将非常大的图像调整到给定的设置,例如图像是 2660x2000 的东西,那么如何将其调整到 1024x960?我尝试了所有可能的帮助,但无法得到我想要的。

最佳答案

只需在您的 CSS 中写入:

(img selector) {
   max-width: 1024px;
   height: auto; /*Height is auto the image to be re-sized proportionally */
}

关于JQuery 颜色框 : Resize very large image to given size,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19753116/

相关文章:

javascript - 通过数据属性数组过滤jquery对象

jquery - 如何扩展 div 以补偿删除边界 div 的边距?

html - 使图像全宽 - Wordpress HTML/CSS

html - 如何缩放 div 以适应 Iframe

html - TYPO3 从 v4 升级到 v7 后的打字规则问题

javascript - 取消只读按钮 "clicked animation"

javascript - 使用 jquery 即时设置 js 下拉菜单的样式

php - jQuery Ajax 第二次提交发送两次,第三次提交发送三次

jQuery 使用 CSS 调整大小。为什么这行不通?

css - 让用户可以选择查看响应式布局的桌面版本