CSS 用margin来控制元素位置怎么样?
看透不说透
看透不说透 2016-12-20 15:54:21
0
3
1007
看透不说透
看透不说透

reply all(3)
数据分析师

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.

这是啥

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

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

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

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

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

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


迷茫

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!