12 行高

    技术2022-07-12  74

    <!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> div{ font-size: 50px; border: red 2px solid; line-height: 100px; /*行高设置的和div的height的值一样,则会使文字(单行)垂直居中*/ /* 设置行高 直接写数字,表示的是字的倍数 line-height: 2; 行高会在字体框的上下平均分配 字体框: 就是字体存在的格子,font-size其实设置的就是字体框 */ } </style> </head> <body> <div>今天天气真是好呀</div> </body> </html>
    Processed: 0.009, SQL: 9