自适应打印图片

This commit is contained in:
Cc 2025-02-28 09:24:56 +08:00
parent 5ad085bf27
commit 746657d25f
2 changed files with 12 additions and 11 deletions

View File

@ -51,23 +51,24 @@ onMounted(() => {
</script> </script>
<style second> <style second>
.container { .container {
width: 600px; width: 30vw;
height: 400px; height: calc(20vw);
position: relative; position: relative;
img { img {
width: 100%; width: 100%;
height: 100%;
} }
.qrcodeimg { .qrcodeimg {
width: 110px; width: 6vw;
height: 110px; height: 6vw;
position: absolute; position: absolute;
bottom: 73px; bottom: 2.2vw;
right: 50px; right: 1.5vw;
} }
.qrcodeSn { .qrcodeSn {
position: absolute; position: absolute;
bottom: 54px; bottom: 1.3vw;
right: 59px; right: 1.9vw;
color: #000; color: #000;
font-weight: bold; font-weight: bold;
} }
@ -81,8 +82,8 @@ onMounted(() => {
} }
.date { .date {
position: absolute; position: absolute;
top: 121px; top: 6.4vw;
left: 180px; left: 8.5vw;
font-size: 20px; font-size: 20px;
font-weight: 500; font-weight: 500;