css中定位的用法

定位 定位(position):用来检索或者设置元素的定位方式(改变元素位置的属性) position的属性值有static、absolute、relative、fixed、sticky 注:使用了定位属性margin:auto会失效。 使用定位的步骤 1:给元素添加position属性 2:寻找参照物 3:添加坐标(四坐标:top、bottom、left、right) 静态定位(static)
相关文章
相关标签/搜索