Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wentin/ResponsifyJS
A jquery plugin that makes images truly responsive, without sacrificing anyone's face. Give it more stars!
https://github.com/wentin/ResponsifyJS
Last synced: 3 months ago
JSON representation
A jquery plugin that makes images truly responsive, without sacrificing anyone's face. Give it more stars!
- Host: GitHub
- URL: https://github.com/wentin/ResponsifyJS
- Owner: wentin
- License: mit
- Created: 2015-11-24T06:00:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-11-25T22:57:54.000Z (over 3 years ago)
- Last Synced: 2024-01-22T02:14:12.487Z (5 months ago)
- Language: HTML
- Homepage: https://responsifyjs.wentin.net/
- Size: 62.7 MB
- Stars: 1,322
- Watchers: 45
- Forks: 83
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: license.txt
Lists
- awesome-frontend - ResponsifyJS - 让图像完全响应式而不会牺牲图像的主要部分
- awesome-stars - wentin/ResponsifyJS - A jquery plugin that makes images truly responsive, without sacrificing anyone's face. Give it more stars! (HTML)
- awesome-stars - wentin/ResponsifyJS - A jquery plugin that makes images truly responsive, without sacrificing anyone's face. Give it more stars! (HTML)
- awesome-front-end - ResponsifyJS - 让图像完全响应式而不会牺牲图像的主要部分
- my-awesome-stars - wentin/ResponsifyJS - A jquery plugin that makes images truly responsive, without sacrificing anyone's face. Give it more stars! (HTML)
- awesome-frontend - ResponsifyJS - 让图像完全响应式而不会牺牲图像的主要部分
README
# Responsify.js
`A jquery plugin that makes images truly responsive, without sacrificing anyone's face :D`
When images are used in a responsive container on web design, because of the container can change to any width:height ratio, a group shot could end up being cut off on people's faces, a nice photograph following "rule of third" could end up with no object in view. Responsive images face the challenge of how to keep the focused objects/area in view, this jquery plugin is here to solve the problem.
### Download
* [responsify.js](https://raw.githubusercontent.com/wentin/ResponsifyJS/master/responsify.js)
* [responsify.min.js](https://raw.githubusercontent.com/wentin/ResponsifyJS/master/responsify.min.js)### Demo
[https://responsifyjs.wentin.net/](https://responsifyjs.wentin.net/)
### App
[https://responsifyjs.wentin.net/app](https://responsifyjs.wentin.net/app)
Use this interactive web app to generate the focus area data
### What it does
Responsify.js does the following:
1. It allows you define a focus area on an image using `data-focus-xxx` tag
2. It takes in the focus area data from the image, calcuate the image's container's size, resize and position the image accordingly, make sure the focus area is always in view and in the best position possible.* Responsive image **with** responsify.js
![with-s](https://cloud.githubusercontent.com/assets/2474904/11459461/dccd59b6-96a4-11e5-81c6-5b16c7d30a23.gif) [play it yourself](http://wentin.github.io/ResponsifyJS/comparison/with-responsify-js/)
* Responsive image **without** responsify.js
![without-s](https://cloud.githubusercontent.com/assets/2474904/11459460/dccd53bc-96a4-11e5-8a33-bea161ef60a9.gif) [play it yourself](http://wentin.github.io/ResponsifyJS/comparison/without-responsify-js/)
### How to use
1. Use this interactive web app to generate the focus area data [http://responsifyjs.space/app/](http://responsifyjs.space/app/)
```
```
`data-focus-left` is the focus area's left position comparing to the image's full width, in decimal. For example, if the full width is 300px, the focus area's left is 90, then the `data-focus-left` should be 90/300 = `0.3`. Same logic applies to other three data attributes.2. Embed the responsify.js in the html
```
```
3. Call responsify function when window object is loaded
```
$(window).load(function() {
$('img').responsify();
});
```
4. Call responsify function again when the window is being resized (optional)
```
$(window).resize(function(){
$('img').responsify();
})
```
###Contact Me
* Follow [@DesignJokes](http://twitter.com/DesignJokes) on Twitter###Other Project by Wentin
* [Type Detail](http://typedetail.com/)
* [underline.js](https://github.com/wentin/underlineJS)