登录社区云,与社区用户共同成长
邀请您加入社区
该用户还未填写简介
暂无可提供的服务
1:设置元素绝对定位,通过margin属性,移动自身宽高的一半2:设置元素绝对定位,设置margin:auto3:设置弹性布局,通过align-items: center;justify-content: center;实现4:设置元素绝对定位,通过transform属性,移动自身宽高的一半代码:<!DOCTYPE html><html lang="en"><head