css中怎么样才能使内容在div的底部中间
css中怎么样才能使内容在div的底部中间
日期:2019-07-23 16:03:13 人气:1
需要准备的材料分别有:电脑、浏览器、html编辑器。
1、首先,打开html编辑器,新建html文件,例如:index.html。
2、在index.html中的标签中,输入css代码:
div {position: relative; width: 200px; height: 80px; border: 1px solid violet;}
span {position: absolute; bottom: 0;left: 80px}
3、浏览器运行index.html页面,此时成功用css实现了