在页面上加入代码可根据需求自己调整

<style media="printContent" scoped>
@page {
size: auto; /* auto is the initial value /
margin: 3mm; / this affects the margin in the printer settings */
}

html {
background-color: #ffffff;
margin: 0px; /* this affects the margin on the html before sending to printer */
}

body {
border: solid 1px rgba(255,255,255,0);
/* margin: 10mm 15mm 10mm 15mm; margin you want for the content */
}
</style>

 

posted on 2020-07-09 10:18  烟云缥缈  阅读(3329)  评论(4编辑  收藏  举报

You win!