这次的坑是和父层字体不一致, 原理我不清楚...
workaround 是不要让子层的字体贴着最上方
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> body { margin: 10px; } * { margin: 0; padding: 0; box-sizing: border-box; } .parent { font-size: 16px; display: inline-flex; width: 100%; border: 1px solid red; } .child { font-size: 12px; /* padding-top: 10px; */ } </style> </head> <body> <div class="parent"> <div class="child"> child </div> </div> <div class="parent"> <div class="child"> child </div> </div> </body> </html>