Home  >  Q&A  >  body text

CSS 用margin来控制元素位置怎么样?

看透不说透看透不说透2831 days ago1008

reply all(3)I'll reply

  • 数据分析师

    数据分析师2017-09-30 23:13:40

    How about using CSS margin to control element position? -PHP Chinese website Q&A-CSS How about using margin to control the position of elements? -PHP Chinese website Q&A

    Please watch and learn.

    reply
    0
  • 这是啥

    这是啥2016-12-20 15:58:23

    margin可以单独改变元素的上,下,左,右边距。也可以一次改变所有的属性。单位可以使用像素px,百分比,厘米等

    margin    简写属性。在一个声明中设置所有外边距属性。    

    margin-bottom    设置元素的下外边距。    

    margin-left    设置元素的左外边距。    

    margin-right    设置元素的右外边距。    

    margin-top    设置元素的上外边距。    


    reply
    0
  • 迷茫

    迷茫2016-12-20 15:54:46

    可以使用css3中的 transform:translate(,) transform:translateX() transform:translateY(),来实现移动元素

    reply
    2
  • Cancelreply