一、当line-height与vertical-align相遇,会发生很多匪夷所思的现象

首先,请看如下代码:

 1 <!DOCTYPE html>
 2 <html>
 3     <head>
 4         <meta charset="utf-8">
 5         <title></title>
 6         <style>
 7             div {
 8                 background-color: red;
 9                 line-height: normal;
10             }
11         </style>
12     </head>
13     <body>
14         <div>
15             <img src="http://a.hiphotos.baidu.com/zhidao/pic/item/72f082025aafa40fa38bfc55a964034f79f019ec.jpg" 
16             alt="A picture" style="width:175px;height:100px" />
17         </div>
18     </body>
19 </html>
View Code

相关文章:

  • 2021-12-02
  • 2022-01-11
  • 2021-05-21
  • 2021-06-14
  • 2022-12-23
  • 2021-12-22
  • 2021-06-12
  • 2021-12-13
猜你喜欢
  • 2021-11-29
  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
  • 2021-05-24
  • 2021-12-29
相关资源
相似解决方案