JSFiddle - React, Tailwind, and code Playground
by jonthomas
HTML
<script src="http://fancyapps.com/fancybox/source/jquery.fancybox.js"></script>
<link rel="stylesheet" href="http://fancyapps.com/fancybox/source/jquery.fancybox.css">
<a class="fancybox" href="http://fancyapps.com/fancybox/demo/1_b.jpg"><img src="http://fancyapps.com/fancybox/demo/1_s.jpg" alt=""/></a>
CSS
/* Set up stylesheet to use border-box on all elements instead of content-box */
* {
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
}
/* Trying to reset box-sizing on just the fancybox containers
* It seems like fancybox creates a temporary div that it does calculations for
* width and height on. This div would have box-sizing: border-box by default,
* and there's no way to set it to box-sizing: content-box
*/
JavaScript
$(".fancybox").fancybox({
margin: 45
});