如何让div在屏幕中居中显示?
元素居中有两种形式一种是相对于屏幕,另一种是相对于其他div,先看第一种形式,div在屏幕中居中显示
直接看css代码
width :500px;height :400px;margin: auto; position: absolute; top: 0; left: 0; bottom: 0; right: 0;
上一篇:css文字溢出使用圆点隐藏
下一篇:怎样把网页中的图片去色变成黑白色
元素居中有两种形式一种是相对于屏幕,另一种是相对于其他div,先看第一种形式,div在屏幕中居中显示
直接看css代码
width :500px;height :400px;margin: auto; position: absolute; top: 0; left: 0; bottom: 0; right: 0;
上一篇:css文字溢出使用圆点隐藏
下一篇:怎样把网页中的图片去色变成黑白色