当前位置: 首页 > 知识库问答 >
问题:

html - 求以下要求的css,这种部局总是搞不清?

岳阳文
2023-10-24

求以下代码描述的css如何写(移动页面),求教了?

<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"></head><body><section>    <section class="head">       固定头部区,层次在上    </section>    <section class="content">        中间内容区,内容超出时可上下滚动,但是这层在最下面    </section>    <section class="foot">       固定页脚导航,好像很app下面那种,层次在上    </section></section></body></html>

共有1个答案

郎同化
2023-10-24
@media screen and (max-width: 768px) {  section {    position: relative;  }  .head {    position: fixed;    top: 0;    left: 0;    width: 100%;    background-color: #fff;    z-index: 999;  }  .content {    margin-top: 64px; /* 固定头部高度 */    padding: 0 15px;    overflow-y: scroll;    z-index: 998;  }  .foot {    position: fixed;    bottom: 0;    left: 0;    width: 100%;    background-color: #fff;    z-index: 999;  }}
 类似资料:
  • 问题1: box1为grid-template-columns: repeat(auto-fill, 20; grid-row-gap: 20px;的情况下没有办法1行5个? 如下图: 问题2: box2为grid-template-columns: auto auto auto auto auto;的情况下,li不足5个是,li的宽度会增多? 如下图:

  • 本章的要求 你需要一个有效的FreeRADIUS服务器来进行实际练习; 干净的安装是首选。

  • 问题内容: 我正在尝试让Javascript读取/写入PostgreSQL数据库。我在github上找到了这个项目。我能够获得以下示例代码以在节点中运行。 接下来,我试图使其在网页上运行,但是似乎什么也没有发生。我在Javascript控制台上进行了检查,它只显示“要求未定义”。 那么这是什么“要求”?为什么它在节点中有效但在网页中无效? 另外,在我让它在节点上工作之前,我必须做。那是什么意思 我

  • 现在有个需求要求我用nestjs写一个接口,处理本地一个json文件处理成一个html页面返回给前端 ,我想问比如返回的格式是这样,"text":'<style>.helloword{width:100px;}</style> <div class="helloword" (click)="handleclick()">你好</div>' 这样返回去的样式和点击事件是否能生效。如果不行该如何做?大

  • 我试图使一个宁静的控制器上传文件。我看到了这一点,做了这个控制器: 然后我用邮递员发送了一份pdf: 但服务器崩溃,出现以下错误: 我再次找到了这个,并添加了一个文件 不幸的是,它仍然抱怨同样的错误。