imgLiquid

jQuery plugin to resize images to fit in a container.

  • 所有者: karacas/imgLiquid
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    2
      比較:

Github星跟蹤圖

ScreenShot

imgLiquid v0.9.944 / 11-04-2013

A jQuery Plugin to resize images to fit in a container.

Alejandro Emparan (karacas) / @krc_ale
Dual licensed under the MIT and GPL licenses.
## 

Usage

Include:

<script src="js/imgLiquid-min.js"></script>

js:

$(document).ready(function() {
	$(".imgLiquidFill").imgLiquid();
});

Html:

<div class="imgLiquidFill imgLiquid" style="width:300px; height:200px;">
	<img alt="Woody" src="woody.jpg" />
</div>

View in action:

http://jsfiddle.net/karacas/3CRx7/#base

http://codepen.io/karacas/pen/nlugd

Features:

    - Uses CSS Background-size when is available. (new!)
    - Bootstrap compatible.
    - Lightweight: < 2.0KBs gzipped.
	- Fill / Crop.
    - Align.
	- Responsive.
	- Svg support.
	- CallBacks.
    - HTML5 data-* attributes.
	- All browsers (Incl. ie6).

 

Options:


    >js
        fill: true,
        verticalAlign:      // 'center' //  'top'   //  'bottom' // '50%'  // '10%'
        horizontalAlign:    // 'center' //  'left'  //  'right'  // '50%'  // '10%'

        //CallBacks
        onStart:        function(){},
        onFinish:       function(){},
        onItemStart:    function(index, container, img){},
        onItemFinish:   function(index, container, img){}

    >hml5 data attr (overwrite js options)
        data-imgLiquid-fill="true"
        data-imgLiquid-horizontalAlign="center"
        data-imgLiquid-verticalAlign="50%"

主要指標

概覽
名稱與所有者karacas/imgLiquid
主編程語言HTML
編程語言JavaScript (語言數: 2)
平台
許可證MIT License
所有者活动
創建於2012-10-05 17:57:31
推送於2018-07-06 14:19:33
最后一次提交2018-07-06 11:19:32
發布數29
最新版本名稱0.9.944 (發布於 )
第一版名稱0.1.0 (發布於 )
用户参与
星數1k
關注者數66
派生數206
提交數159
已啟用問題?
問題數38
打開的問題數14
拉請求數7
打開的拉請求數1
關閉的拉請求數2
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?