结构与布局

编程入门 行业动态 更新时间:2024-10-11 07:35:35

结构与<a href=https://www.elefans.com/category/jswz/34/1770549.html style=布局"/>

结构与布局

<style> *{margin:0;padding: 0;} /*第一种方法*/ /*body{color:#fff;text-align: center;} header{background: #000;height:3.5em;} main{ min-height: calc(100vh - 3.5em - 3.5em); box-sizing: border-box; background: #0b7c4b; } footer{background: #103582;height:3.5em;}*/ /*第二种方法*/ body{display: flex;flex-flow: column;text-align: center;} main{flex:1;background: #103582;min-height: 100vh;} footer{background: #000;color:#fff;}

</style> <header> <h2>41.紧贴底部的页脚</h2> <p>我是头部</p> </header> <main> <h2>I am main</h2> <h2>what can be the meaning of that</h2> <p>emphatic exclamation </p> </main> <footer> <p> Iam footer</p> <p>@2018 no right reserve.</p> <p>made with by song</p> </footer>

转载于:.html

更多推荐

结构与布局

本文发布于:2024-03-08 20:01:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1722138.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:布局   结构

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!