A jquery plugin that makes images truly responsive, without sacrificing anyone's face. Give it more stars!
See the codeA 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.
https://responsifyjs.wentin.net/
https://responsifyjs.wentin.net/app
Use this interactive web app to generate the focus area data
Responsify.js does the following:
data-focus-xxx tag <img src="image.png" alt=""
data-focus-left=".30" data-focus-top=".12" data-focus-right=".79" data-focus-bottom=".66" />
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.
<script src="responsify.js"></script>
$(window).load(function() {
$('img').responsify();
});
$(window).resize(function(){
$('img').responsify();
})
###Contact Me
###Other Project by Wentin
221 followers · starred Apr 2016
117 followers · starred Jan 2016
26 followers · starred Jan 2016
A jquery plugin that makes images truly responsive, without sacrificing anyone's face. Give it more stars!
See the codeA 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.
https://responsifyjs.wentin.net/
https://responsifyjs.wentin.net/app
Use this interactive web app to generate the focus area data
Responsify.js does the following:
data-focus-xxx tag <img src="image.png" alt=""
data-focus-left=".30" data-focus-top=".12" data-focus-right=".79" data-focus-bottom=".66" />
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.
<script src="responsify.js"></script>
$(window).load(function() {
$('img').responsify();
});
$(window).resize(function(){
$('img').responsify();
})
###Contact Me
###Other Project by Wentin
221 followers · starred Apr 2016
117 followers · starred Jan 2016
26 followers · starred Jan 2016