search

Home  >  Q&A  >  body text

css3 - css transform是不是不会改变原来元素在文档中的位置和大小?

是不是变换后就相当于在原来的位置挖了一个坑,原来该元素的布局都是保留下来的,我也不知道该怎么形容,就是transform变换前后都不会影响原来其他元素的布局? 它是不是相当于position:absolute;使元素从原来的文档流脱出,只是这个是相对于它本身的absolute,并且把z-index提生到最高?

天蓬老师天蓬老师2788 days ago531

reply all(2)I'll reply

  • 迷茫

    迷茫2017-04-17 11:11:21

    Transform is a rendering done by the browser on existing elements. It will not change the position or size. The implementation principle is definitely not position or z-index, it is an independent function

    reply
    0
  • 阿神

    阿神2017-04-17 11:11:21

    Transform is equivalent to relative, although it is moved or enlarged or reduced. Its position in the document flow remains unchanged and does not affect the layout.

    reply
    0
  • Cancelreply