$(window).readyresize(function(width, height) { // using jPutty });
<!-- () --> <div id="dark"> <!-- Sliderman Endegor's Degustation --> <div id="DegustationNavigation"></div> <div id="Degustation"> <img src="./img/Degustation/cognac.png" width="383" height="600" alt="Degustation cognac" /> <img src="./img/Degustation/riesling.png" width="383" height="600" alt="Degustation riesling" /> <img src="./img/Degustation/bourgogne.png" width="383" height="600" alt="Degustation bourgogne" /> <img src="./img/Degustation/bordeaux.png" width="383" height="600" alt="Degustation bordeaux" /> <img src="./img/Degustation/champagne.png" width="383" height="600" alt="Degustation champagne" /> <img src="./img/Degustation/martini.png" width="383" height="600" alt="Degustation martini" /> </div> <!-- /Sliderman Endegor's Degustation --> <div class="delivery_text"> </div> <a href="#"> <div class="shop_wine"></div> <div class="shop_wine_text"></div> </a> <a href="#"> <div class="shop_cognac"></div> <div class="shop_cognac_text"></div> </a> <a href="#"> <div class="shop_armagnac"></div> <div class="shop_armagnac_text"></div> </a> <div class="JJB"></div> <div class="line"></div> </div> <!-- / () -->
#dark { background-color: #000; color: #f0f0f0; z-index: -10; } #dark .delivery_text { text-align: right; font-size: 12pt; } #dark .shop_wine { background-image: url(../img/shop/wine.png); } #dark .shop_wine_text { text-align: center; } #dark .shop_cognac { background-image: url(../img/shop/cognac.png); } #dark .shop_cognac_text { text-align: center; } #dark .shop_armagnac { background-image: url(../img/shop/armagnac.png); } #dark .shop_armagnac_text { text-align: center; } #dark .JJB { background-image: url("../img/Jean Jacques Brissot.png"); } #dark .line { background-color: #fff; z-index: -10; }
$(window).readyresize(function(width, height) { ... var dy = (height - 600) / 1.618 + 35; $('#dark').putty('xysize', 0, 0, width, height); $('#dark #Degustation').putty('xysize', 0, dy - 35 - 1, 383, 600); $('#dark #DegustationNavigation').putty('xysize', 0, dy - 35, 20, 600); $("#dark #DegustationNavigation a").each(function (i) { $(this).putty('xysize', 25, 10 + 25 * i, 11, 11); }); $('#dark .delivery_text').putty('xysize', 0, 5, width - 50, 30); $('#dark .shop_wine').putty('xysize', (width - width / 1.618) - 48 / 2, dy, 48, 174); $('#dark .shop_wine_text').putty('xysize', (width - width / 1.618) - 100, dy + 174, 200, 36); $('#dark .shop_cognac').putty('xysize', (width / 1.618) - 68 / 2, dy + 174 - 139, 68, 139); $('#dark .shop_cognac_text').putty('xysize', (width / 1.618) - 100, dy + 174, 200, 36); $('#dark .shop_armagnac').putty('xysize', (3*width / 1.618 - width) - 36 / 2, dy + 174 - 172, 36, 172); $('#dark .shop_armagnac_text').putty('xysize', (3*width / 1.618 - width) - 100, dy + 174, 200, 36); $('#dark .JJB').putty('xysize', 383, height / 1.618 - 76, 768, 76); $('#dark .line').putty('xysize', 0, height / 1.618, width, 1); ... });
Source: https://habr.com/ru/post/186484/
All Articles