search

Home  >  Q&A  >  body text

为什么将元素设置为内联块状元素背景会变大?这个和浏览器设置有没有关系?

看透不说透看透不说透2897 days ago1149

reply all(2)I'll reply

  • 数据分析师

    数据分析师2017-09-30 23:49:30

    Why does the background of a block element become larger when it is set to inline? Does this have anything to do with browser settings? -PHP Chinese website Q&A-Why does the background of an element become larger when it is set as an inline block element? Does this have anything to do with browser settings? -PHP Chinese website Q&A

    Please watch and learn.

    reply
    0
  • 迷茫

    迷茫2016-12-26 15:37:47

    a在开始的时候是内联元素,内联元素不可以设置宽和高。将元素设置为内联块状元素之后,可以设置宽和高了,之前设置的宽和高的值起作用了,所以背景变大了。

    reply
    0
  • Cancelreply