关键词搜索

源码搜索 ×
×

前端笔记-CSS布局使得网页分成3部(头,内容,脚)

发布2019-08-06浏览5531次

详情内容

css代码如下:

  1. <style>
  2. * {
  3. margin: 0;
  4. padding: 0;
  5. }
  6. .top {
  7. width: 100%;
  8. height: 40px;
  9. background-color: #2fa8ec;
  10. font-size: 20px;
  11. line-height: 25px;
  12. }
  13. .middle {
  14. position: absolute;
  15. top: 0px;
  16. bottom: 40px;
  17. width: 100%;
  18. /*background-color: yellow;*/
  19. font-size: 35px;
  20. /*text-align: center;*/
  21. }
  22. .bottom {
  23. position: absolute;
  24. bottom: 0;
  25. width: 100%;
  26. height: 40px;
  27. line-height: 40px; /*行高与高度相等,内容垂直居中*/
  28. /*background-color: chartreuse;*/
  29. text-align: center;
  30. }
  31. </style>

应用代码如下:

  1. <template>
  2. <div>
  3. <div class="middle">
  4. <div class="ui container">
  5. <div class="ui stackable grid">
  6. <div class="six wide column">
  7. <xxxxxxxx></xxxxxxxx>
  8. </div>
  9. <div class="six wide column">
  10. <xxxxxxxx></xxxxxxxx>
  11. </div>
  12. <div class="four wide column">
  13. <xxxxxxxx></xxxxxxxx>
  14. </div>
  15. </div>
  16. </div>
  17. </div>
  18. <div class="bottom">
  19. <MainFunctionTool></MainFunctionTool>
  20. </div>
  21. </div>
  22. </template>

运行截图如下:

相关技术文章

点击QQ咨询
开通会员
返回顶部
×
微信扫码支付
微信扫码支付
确定支付下载
请使用微信描二维码支付
×

提示信息

×

选择支付方式

  • 微信支付
  • 支付宝付款
确定支付下载