Finally, the fixed position on both sides of the text is solved, and the position does not change as the page zooms in or out

<template>
<div class="box">
  <div class="left">12</div>
  <div class="right">23</div>
</div>
</template>
<style scoped>
.left{
  /* 给左边设置一个固定宽度,可根据自己想要设置的右边的位置,改变这个左边的数值 */
  width:95%;
}
.right {
  /* 将右边的盒子flex设置为1 */
  flex:1;
}
.box{
  display: flex;
}

</style>

achieve effect

 After the page is doubled, the original position of the font remains unchanged

 

Guess you like

Origin blog.csdn.net/m0_65380423/article/details/129870807