【发布时间】:2014-11-13 09:11:46
【问题描述】:
我有:
function printContent2(div_id)
{
var content = document.getElementById(div_id);
var map_src = window.open("", "PRINT MAP", "width=800,height=600,top=0,left=0,toolbar=no,scrollbars=no,status=no,resizable=no");
map_src.document.write('<html><head>');
map_src.document.write('<link rel="stylesheet" href="/leaflet-0.5.1/0.7.3/leaflet.css"/>');
map_src.document.write('</head><body>');
map_src.document.write(content.innerHTML);
map_src.document.write('</body></html>');
map_src.document.close();
map_src.focus();
map_src.print();
}
.mapstyle {
height: 100%;
height: -webkit-calc(100% - 69px);
height: -moz-calc(100% - 69px);
height: calc(100% - 74px);
margin-left: 420px;
}
div id="map" class="mapstyle"
之后
printContent2('map');
在完整列表中显示。
我需要设置高度 = 400px。
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
【问题讨论】:
标签: javascript html printing stylesheet