html css怎么让文字在页面底部居中

html-css06

html css怎么让文字在页面底部居中,第1张

1、想要让文字在底部,需要用到 position:fixedbottom:0pxleft:0px

2、想要让文字居中,需要用到 text-align:center

3、具体代码

<div class="div_foot">   

&copy2017-2018

</div>

.div_foot {

position: absolute

height: 50px

text-align: center

line-height: 50px

width: 100%

扩展资料

HTML的编辑器

1、基本文本、文档编辑软件,使用微软自带的记事本或写字板都可以编写,当然,如果你用WPS来编写,也可以。不过存盘时请使用.htm或.html作为扩展名,这样就方便浏览器认出直接解释执行了。

2、半所见即所得软件,

如:FCK-Editer、E-webediter等在线网页编辑器;

3、所见即所得软件,使用最广泛的编辑器,完全可以一点不懂HTML的知识就可以做出网页,如:

AMAYA(出品单位:万维网联盟);

FRONTPAGE(出品单位:微软);

Dreamweaver(出品单位:Adobe)。

参考资料

百度百科-HTML

、首先新建一个html页面,然后在这个html代码页面创建一个<div>标签,同时给这个<div>添加一个class类为footer。

2、然后设置footer类,把div固定在底部。创建<style>标签,在该标签内设置通过position: fixedbottom:0设置footer类样式,把div固定在底部。

css样式代码:

.footer{

height: 100px

width: 100%

background-color: #ddd

position: fixed

bottom: 0

}

3、保存html代码,然后使用浏览器打开即可看到不管如何放大缩小浏览器div都是固定在底部的。