Наши проекты:
Журнал · Discuz!ML · Wiki · DRKB · Помощь проекту |
||
ПРАВИЛА | FAQ | Помощь | Поиск | Участники | Календарь | Избранное | RSS |
[52.15.112.69] |
|
Сообщ.
#1
,
|
|
|
Здравствуйте! Столкнулся с проблемой, нужно фото которое на сайте распечатать, как сделать чтобы при печати фото заняло лист А4?
|
Сообщ.
#2
,
|
|
|
В стандартной печати самый первый шаблон, и поставить галочку "Изображение по размеру кадра". Но не все принтеры поддерживают печать на весь лист без полей. Плюс на обычной бумаге не рекомендуется печатать без полей, только на фотобумаге.
|
Сообщ.
#3
,
|
|
|
Как сделать при помощи css?
|
Сообщ.
#4
,
|
|
|
<!doctype html> <html> <head> <meta charset=utf-8> <title>Слайд-шоу</title> <SCRIPT Language="Javascript"> function printit() { window.print(); } </script> <style> @media print { *{ color:#0000 !important; background-transparent: !important; } html{ font-family: "Times New Roman", Times, serif; } body{ padding-left: 1%; padding-right: 1%; } #bt_Ctr{ display:none; } #show button { display:none; } img { width: 100%; height: 100%; } #view { width: 100%; height: 100%; } } *{margin:0;padding:0} #show{display:none;margin-top:1em;} body{width:400px;margin:100px auto 0} .view { width:inherit; height:200px; overflow:scroll } .view ul { list-style:none; width:10000px; } .view li{float:left} #show button { padding:1em; margin-right:1em; cursor:pointer } </style> </head> <body> <div class='view'> <ul> <li><img src='img/ettlingen01.jpg'></li> <li><img src='img/kremlin01.jpg'></li> <li><img src='img/kremlin02.jpg'></li> <li><img src='img/kremlin03.jpg'></li> </ul> </div> <div id='show'> <button id='prev'>Назад</button> <button id='next'>Вперед</button> </div> <script src="jquery.js" type="text/javascript"></script> <script src="slide-show.js"></script> </br></br></br></br> <div id="bt_Ctr" style='margin-left:25%;'> <form> <input TYPE="button" CLASS="for" VALUE="Распечатать страницу!" onClick="printit()"> </form> </div> </body> </html> (function($){ var viewUL=$('div.view').css('overflow','hidden').children('ul'); imgs=viewUL.find('img'), imgW=imgs[0].width, imgsLen=imgs.length, totalImgsW=imgW*imgsLen, current=1; $('#show').show().find('button').on('click', function(){ //console.log($(this)); var direction=$(this).attr('id'); //console.log(direction); var position=imgW; (direction === 'next') ? ++current : --current; if(current === 0) { current=imgsLen; direction='next'; position=totalImgsW-imgW; } else if(current-1===imgsLen) { current=1; position=0; } doit(viewUL,position,direction); }); function doit(container,position,direction) { var sign; if(direction && position !==0) { sign=(direction === 'next') ? '-=' : '+='; } container.animate({ 'margin-left' : sign ? (sign+position) : position }); } })(jQuery); Добавлено slide-show.js |
Сообщ.
#5
,
|
|
|
А почему бы не поставить в body padding:0 ?
|