我有一个非常简单的页面生成一张票。它在用户名+票号后面有一个img。一切都正确显示,但 Firefox 根本不打印这些名称。有任何想法吗?
编辑:我已经添加了我在那里的所有代码。不知道我可以添加更多。
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>FN Ticket</title>
<style>
body{
overflow:scroll;
text-align:center;
}
.box{
/* background-image: url('/images/Karolina_GFX/2bilet.jpg');*/
background-repeat: no-repeat;
height:1200px;
width:848px;
margin-left:auto;
margin-right:auto;
}
.data{
position:relative; bottom:820px;
margin-left:auto;
margin-right:auto;
}
#imie{
display:inline;
font-size:36px;
color:#4D4949;
}
#nazwisko{
display:inline;
font-size:36px;
color:#4D4949;
}
#kod{
font-size:36px;
color:#4D4949;
}
.print{
margin-left:auto;
margin-right:auto;
margin-top:20px;
margin-bottom:20px;
padding:5px;
}
@media print {
.print{
display:none;
}
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
</head>
<body>
<button class='print'>WYDRUKUJ</button>
<div class='box'>
<image src='/images/Karolina_GFX/2bilet.jpg'>
<div class='data'>
<p id='imie'><?php echo $ticketData[0]->f_name; ?> </p>
<p id='nazwisko'><?php echo $ticketData[0]->f_surname; ?></p>
<p id='kod'>Kod: <?php echo $ticketData[0]->f_code; ?></p>
</div>
<script>
$('.print').on('click', function(){
print();
});
</script>
</body>
</html>