使用CSS让DIV水平垂直居中的方法
发布时间:2018-09-12 23:30:34 所属栏目:经验 来源:站长网
导读:要点: 1.position属性设置为:absolute 2.top和left属性都设为:50% 3.margin-top宽度设置为height高度的一半,margin-left属性设置为width宽度的一半。 htmlheadtitleDIV水平垂直居中/titlestylebody{font-size:12px; margin:0; padding:0;}.div1{positi
要点: 1.position属性设置为:absolute 2.top和left属性都设为:50% 3.margin-top宽度设置为height高度的一半,margin-left属性设置为width宽度的一半。
(编辑:威海站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |