CSS页脚覆盖部分

如何解决CSS页脚覆盖部分

我为每个页面的页眉/页脚创建一个字母模板 但是当内容太长时,它不会在页脚节之前中断页面怎么办? 在我现在的内容中,它覆盖了印刷媒体的页脚部分 请提出任何建议或帮助我如何在每页上重复页眉和页脚,然后打印出

.mmm div,其中包含没有覆盖的内容部分

.my-footer {
      bottom: 0;
      position: fixed;
      right: 0;
      width:50%
    }

    .my-header {
      top: 0;
      right: -150;
      position: fixed;
      width:100%;
    }

    .date-number-div {
      margin-top:12%;
      position: relative;
    padding-left:50;
    font-size:14;
    padding-top:1%;
    }

    .for-subject-div{
      margin-top:3%;padding-right:50px;padding-left:65px;
    }

    .content-div{
      position: relative;
    padding-bottom:350px;padding-right:50px;padding-left:65px;float: right;
    page-break-after: always;
    }
    .regard-div{
        margin-top:9%;font-size:16px;
    }
    .cpp-div{
         position: relative;
    margin-top:0%;padding-right:0px;font-size:9px;
    }
    .signature-img {
        
      position: static;
      bottom: -60%;
      padding-left:60px; 
    }
<div id="answerContent" class="border" style="width:870px;  margin: 0 auto; ">
                            <div class="my-header">header section</div>
                            <div class="mmm">
                                <div class="col-sm-12 col-md-12 col-lg-12 text-left date-number-div" >
                                        <span class="a-letter-c-number" name="a-letter-c-number">112233</span>
                                        <span class="a-letter-c-date" name="a-letter-c-date">2020-20-02</span>
                                    </div>
                                    <div class="col-sm-12 col-md-12 col-lg-12  text-right for-subject-div" >
                                    <span dir="rtl" class="a-letter-c-from" name="a-letter-c-from">from</span>
                                    <span dir="rtl" class="a-letter-c-subject" name="a-letter-c-subject">subject</span>
                                    </div>
                                    <div dir="rtl" class="col-sm-12 col-md-12 col-lg-12 text-right content-div" >
                                    <span dir="rtl" class="a-letter-c-content" name="a-letter-c-content">The toppings you may chose for that TV dinner pizza slice when you forgot to shop for foods,the paint you may slap on your face to impress the new boss is your business. But what about your daily bread? Design comps,layouts,wireframes—will your clients accept that you go about things the facile way? Authorities in our business will tell in no uncertain terms that Lorem Ipsum is that huge,huge no no to forswear forever. Not so fast,I'd say,there are some redeeming factors in favor of greeking text,as its use is merely the symptom of a worse problem to take into consideration.

You begin with a text,you sculpt information,you chisel away what's not needed,you come to the point,make things clear,add value,you're a content person,you like words. Design is no afterthought,far from it,but it comes in a deserved second. Anyway,you still use Lorem Ipsum and rightly so,as it will always have a place in the web workers toolbox,as things happen,not always the way you like it,not always in the preferred order. Even if your less into design and more into content strategy you may find some redeeming value with,wait for it,dummy copy,no less.

Consider this: You made all the required mock ups for commissioned layout,got all the approvals,built a tested code base or had them built,you decided on a content management system,got a license for it or adapted open source software for your client's needs. Then the question arises: where's the content? Not there yet? That's not so bad,there's dummy copy to the rescue. But worse,what if the fish doesn't fit in the can,the foot's to big for the boot? Or to small? To short sentences,to many headings,images too large for the proposed design,or too small,or they fit in but it looks iffy for reasons the folks in the meeting can't quite tell right now,but they're unhappy,somehow. A client that's unhappy for a reason is a problem,a client that's unhappy though he or her can't quite put a finger on it is worse.

But. A big but: Lorem Ipsum is not t the root of the problem,it just shows what's going wrong. Chances are there wasn't collaboration,communication,and checkpoints,there wasn't a process agreed upon or specified with the granularity required. It's content strategy gone awry right from the start. Forswearing the use of Lorem Ipsum wouldn't have helped,won't help now. It's like saying you're a bad designer,use less bold text,don't use italics in every other paragraph. True enough,but that's not all that it takes to get things back on track.

So Lorem Ipsum is bad (not necessarily)

There's lot of hate out there for a text that amounts to little more than garbled words in an old language. The villagers are out there with a vengeance to get that Frankenstein,wielding torches and pitchforks,wanting to tar and feather it at the least,running it out of town in shame.

One of the villagers,Kristina Halvorson from Adaptive Path,holds steadfastly to the notion that design can’t be tested without real content:

I’ve heard the argument that “lorem ipsum” is effective in wireframing or design because it helps people focus on the actual layout,or color scheme,or whatever. What kills me here is that we’re talking about creating a user experience that will (whether we like it or not) be DRIVEN by words. The entire structure of the page or app flow is FOR THE WORDS.
If that's what you think how bout the other way around? How can you evaluate content without design? No typography,no colors,no layout,no styles,all those things that convey the important signals that go beyond the mere textual,hierarchies of information,weight,emphasis,oblique stresses,priorities,all those subtle cues that also have visual and emotional appeal to the reader. Rigid proponents of content strategy may shun the use of dummy copy but then designers might want to ask them to provide style sheets with the copy decks they supply that are in tune with the design direction they require.

Or else,an alternative route: set checkpoints,networks,processes,junctions between content and layout. Depending on the state of affairs it may be fine to concentrate either on design or content,reversing gears when needed.

Or maybe not. How about this: build in appropriate intersections and checkpoints between design and content. Accept that it’s sometimes okay to focus just on the content or just on the design.

Luke Wroblewski,currently a Product Director at Google,holds that fake data can break down in real life:

Using dummy content or fake information in the Web design process can result in products with unrealistic assumptions and potentially serious design flaws. A seemingly elegant design can quickly begin to bloat with unexpected content or break under the weight of actual activity. Fake data can ensure a nice looking layout but it doesn’t reflect what a living,breathing application must endure. Real data does.
Websites in professional use templating systems. Commercial publishing platforms and content management systems ensure that you can show different text,different data using the same template. When it's about controlling hundreds of articles,product pages for web shops,or user profiles in social networks,all of them potentially with different sizes,formats,rules for differing elements things can break,designs agreed upon can have unintended consequences and look much different than expected.

This is quite a problem to solve,but just doing without greeking text won't fix it. Using test items of real content and data in designs will help,but there's no guarantee that every oddity will be found and corrected. Do you want to be sure? Then a prototype or beta site with real content published from the real CMS is needed—but you’re not going that far until you go through an initial design cycle.

Lorem Ipsum actually is usefull in the design stage as it focuses our attention on places where the content is a dynamic block coming from the CMS (unlike static content elements that will always stay the same.) Blocks of Lorem Ipsum with a character count range provide a obvious reminder to check and re-check that the design and the content model match up.

Kyle Fiedler from the Design Informer feels that distracting copy is your fault:

If the copy becomes distracting in the design then you are doing something wrong or they are discussing copy changes. It might be a bit annoying but you could tell them that that discussion would be best suited for another time. At worst the discussion is at least working towards the final goal of your site where questions about lorem ipsum don’t.
Summing up,if the copy is diverting attention from the design it’s because it’s not up to task.

Typographers of yore didn't come up with the concept of dummy copy because people thought that content is inconsequential window dressing,only there to be used by designers who can’t be bothered to read. Lorem Ipsum is needed because words matter,a lot. Just fill up a page with draft copy about the client’s business and they will actually read it and comment on it. They will be drawn to it,fiercely. Do it the wrong way and draft copy can derail your design review.

Asking the client to pay no attention Lorem Ipsum isn't hard as it doesn’t make sense in the first place,that will limit any initial interest soon enough. Try telling a client to ignore draft copy however,and you're up to something you can't win. Whenever draft copy comes up in a meeting confused questions about it ensue.

Summing up,really:

Lorem Ipsum is a tool that can be useful,used intentionally it may help solve some problems. If you go about content strategy the wrong way,fix that problem.</span>
                                    </div>
                                    <div class="col-sm-12 col-md-12 col-lg-12 text-center regard-div" >
                                    <span dir="rtl" class="a-letter-c-end" name="a-letter-c-end">regards</span><br><br>
                                    </div>
                                    <div  id="a-sig" class="col-sm-12 col-md-12 col-lg-12 text-left signature-img" >
                                    signature section
                                    </div>
                                    <div id="a-cp-cover" class="col-sm-12 col-md-12 col-lg-12 text-right cpp-div" >
                                    <span dir="rtl" >
                                    وێنەیەك بۆ/ 
                                    </span>
                                    <ul class="a-cpfor cpp-div" name="a-cpfor" dir="rtl" >
                                        
                                    </ul> 
                                        
                                </div>
                                </div>
                                <div class="my-footer">footer section</div>
                        
                        </div>

html代码

    <div id="answerContent" class="border" style="width:870px;  margin: 0 auto; ">
                        <div class="my-header">header section</div>
                        <div class="mmm">
                            <div class="col-sm-12 col-md-12 col-lg-12 text-left date-number-div" >
                                    <span class="a-letter-c-number" name="a-letter-c-number">112233</span>
                                    <span class="a-letter-c-date" name="a-letter-c-date">2020-20-02</span>
                                </div>
                                <div class="col-sm-12 col-md-12 col-lg-12  text-right for-subject-div" >
                                <span dir="rtl" class="a-letter-c-from" name="a-letter-c-from">from</span>
                                <span dir="rtl" class="a-letter-c-subject" name="a-letter-c-subject">subject</span>
                                </div>
                                <div dir="rtl" class="col-sm-12 col-md-12 col-lg-12 text-right content-div" >
                                <span dir="rtl" class="a-letter-c-content" name="a-letter-c-content">content </span>
                                </div>
                                <div class="col-sm-12 col-md-12 col-lg-12 text-center regard-div" >
                                <span dir="rtl" class="a-letter-c-end" name="a-letter-c-end">regards</span><br><br>
                                </div>
                                <div  id="a-sig" class="col-sm-12 col-md-12 col-lg-12 text-left signature-img" >
                                signature section
                                </div>
                                <div id="a-cp-cover" class="col-sm-12 col-md-12 col-lg-12 text-right cpp-div" >
                                <span dir="rtl" >
                                وێنەیەك بۆ/ 
                                </span>
                                <ul class="a-cpfor cpp-div" name="a-cpfor" dir="rtl" >
                                    
                                </ul> 
                                    
                            </div>
                            </div>
                            <div class="my-footer">footer section</div>
                    
                    </div>

CSS代码

@media print{
.my-footer {
  bottom: 0;
  position: fixed;
  right: 0;
  width:50%
}

.my-header {
  top: 0;
  right: -150;
  position: fixed;
  width:100%;
}

.date-number-div {
  margin-top:12%;
  position: relative;
padding-left:50;
font-size:14;
padding-top:1%;
}

.for-subject-div{
  margin-top:3%;padding-right:50px;padding-left:65px;
}

.content-div{
  position: relative;
padding-bottom:350px;padding-right:50px;padding-left:65px;float: right;
page-break-after: always;
}
.regard-div{
    margin-top:9%;font-size:16px;
}
.cpp-div{
     position: relative;
margin-top:0%;padding-right:0px;font-size:9px;
}
.signature-img {
    
  position: static;
  bottom: -60%;
  padding-left:60px; 
}

}

解决方法

在页脚部分添加100%的宽度,并为其设置非透明背景。请参见代码段,然后可以正常运行。

.my-footer {
      bottom: 0;
      position: fixed;
      right: 0;
      width: 100%;
      background-color: white;
      text-align: center;
      margin: 0;
    }

    .my-header {
      top: 0;
      right: 0;
      position: fixed;
      width:100%;
      background-color: white;
      text-align: center;
      margin: 0;
      z-index: 2;
    }

    .date-number-div {
      margin-top:12%;
      position: relative;
    padding-left:50;
    font-size:14;
    padding-top:1%;
    }

    .for-subject-div{
      margin-top:3%;padding-right:50px;padding-left:65px;
    }

    .content-div{
      position: relative;
    padding-bottom:350px;padding-right:50px;padding-left:65px;float: right;
    page-break-after: always;
    }
    .regard-div{
        margin-top:9%;font-size:16px;
    }
    .cpp-div{
         position: relative;
    margin-top:0%;padding-right:0px;font-size:9px;
    }
    .signature-img {
        
      position: static;
      bottom: -60%;
      padding-left:60px; 
    }
<div id="answerContent" class="border" style="width:870px;  margin: 0 auto; ">
                            <div class="my-header">header section</div>
                            <div class="mmm">
                                <div class="col-sm-12 col-md-12 col-lg-12 text-left date-number-div" >
                                        <span class="a-letter-c-number" name="a-letter-c-number">112233</span>
                                        <span class="a-letter-c-date" name="a-letter-c-date">2020-20-02</span>
                                    </div>
                                    <div class="col-sm-12 col-md-12 col-lg-12  text-right for-subject-div" >
                                    <span dir="rtl" class="a-letter-c-from" name="a-letter-c-from">from</span>
                                    <span dir="rtl" class="a-letter-c-subject" name="a-letter-c-subject">subject</span>
                                    </div>
                                    <div dir="rtl" class="col-sm-12 col-md-12 col-lg-12 text-right content-div" >
                                    <span dir="rtl" class="a-letter-c-content" name="a-letter-c-content">The toppings you may chose for that TV dinner pizza slice when you forgot to shop for foods,the paint you may slap on your face to impress the new boss is your business. But what about your daily bread? Design comps,layouts,wireframes—will your clients accept that you go about things the facile way? Authorities in our business will tell in no uncertain terms that Lorem Ipsum is that huge,huge no no to forswear forever. Not so fast,I'd say,there are some redeeming factors in favor of greeking text,as its use is merely the symptom of a worse problem to take into consideration.

You begin with a text,you sculpt information,you chisel away what's not needed,you come to the point,make things clear,add value,you're a content person,you like words. Design is no afterthought,far from it,but it comes in a deserved second. Anyway,you still use Lorem Ipsum and rightly so,as it will always have a place in the web workers toolbox,as things happen,not always the way you like it,not always in the preferred order. Even if your less into design and more into content strategy you may find some redeeming value with,wait for it,dummy copy,no less.

Consider this: You made all the required mock ups for commissioned layout,got all the approvals,built a tested code base or had them built,you decided on a content management system,got a license for it or adapted open source software for your client's needs. Then the question arises: where's the content? Not there yet? That's not so bad,there's dummy copy to the rescue. But worse,what if the fish doesn't fit in the can,the foot's to big for the boot? Or to small? To short sentences,to many headings,images too large for the proposed design,or too small,or they fit in but it looks iffy for reasons the folks in the meeting can't quite tell right now,but they're unhappy,somehow. A client that's unhappy for a reason is a problem,a client that's unhappy though he or her can't quite put a finger on it is worse.

But. A big but: Lorem Ipsum is not t the root of the problem,it just shows what's going wrong. Chances are there wasn't collaboration,communication,and checkpoints,there wasn't a process agreed upon or specified with the granularity required. It's content strategy gone awry right from the start. Forswearing the use of Lorem Ipsum wouldn't have helped,won't help now. It's like saying you're a bad designer,use less bold text,don't use italics in every other paragraph. True enough,but that's not all that it takes to get things back on track.

So Lorem Ipsum is bad (not necessarily)

There's lot of hate out there for a text that amounts to little more than garbled words in an old language. The villagers are out there with a vengeance to get that Frankenstein,wielding torches and pitchforks,wanting to tar and feather it at the least,running it out of town in shame.

One of the villagers,Kristina Halvorson from Adaptive Path,holds steadfastly to the notion that design can’t be tested without real content:

I’ve heard the argument that “lorem ipsum” is effective in wireframing or design because it helps people focus on the actual layout,or color scheme,or whatever. What kills me here is that we’re talking about creating a user experience that will (whether we like it or not) be DRIVEN by words. The entire structure of the page or app flow is FOR THE WORDS.
If that's what you think how bout the other way around? How can you evaluate content without design? No typography,no colors,no layout,no styles,all those things that convey the important signals that go beyond the mere textual,hierarchies of information,weight,emphasis,oblique stresses,priorities,all those subtle cues that also have visual and emotional appeal to the reader. Rigid proponents of content strategy may shun the use of dummy copy but then designers might want to ask them to provide style sheets with the copy decks they supply that are in tune with the design direction they require.

Or else,an alternative route: set checkpoints,networks,processes,junctions between content and layout. Depending on the state of affairs it may be fine to concentrate either on design or content,reversing gears when needed.

Or maybe not. How about this: build in appropriate intersections and checkpoints between design and content. Accept that it’s sometimes okay to focus just on the content or just on the design.

Luke Wroblewski,currently a Product Director at Google,holds that fake data can break down in real life:

Using dummy content or fake information in the Web design process can result in products with unrealistic assumptions and potentially serious design flaws. A seemingly elegant design can quickly begin to bloat with unexpected content or break under the weight of actual activity. Fake data can ensure a nice looking layout but it doesn’t reflect what a living,breathing application must endure. Real data does.
Websites in professional use templating systems. Commercial publishing platforms and content management systems ensure that you can show different text,different data using the same template. When it's about controlling hundreds of articles,product pages for web shops,or user profiles in social networks,all of them potentially with different sizes,formats,rules for differing elements things can break,designs agreed upon can have unintended consequences and look much different than expected.

This is quite a problem to solve,but just doing without greeking text won't fix it. Using test items of real content and data in designs will help,but there's no guarantee that every oddity will be found and corrected. Do you want to be sure? Then a prototype or beta site with real content published from the real CMS is needed—but you’re not going that far until you go through an initial design cycle.

Lorem Ipsum actually is usefull in the design stage as it focuses our attention on places where the content is a dynamic block coming from the CMS (unlike static content elements that will always stay the same.) Blocks of Lorem Ipsum with a character count range provide a obvious reminder to check and re-check that the design and the content model match up.

Kyle Fiedler from the Design Informer feels that distracting copy is your fault:

If the copy becomes distracting in the design then you are doing something wrong or they are discussing copy changes. It might be a bit annoying but you could tell them that that discussion would be best suited for another time. At worst the discussion is at least working towards the final goal of your site where questions about lorem ipsum don’t.
Summing up,if the copy is diverting attention from the design it’s because it’s not up to task.

Typographers of yore didn't come up with the concept of dummy copy because people thought that content is inconsequential window dressing,only there to be used by designers who can’t be bothered to read. Lorem Ipsum is needed because words matter,a lot. Just fill up a page with draft copy about the client’s business and they will actually read it and comment on it. They will be drawn to it,fiercely. Do it the wrong way and draft copy can derail your design review.

Asking the client to pay no attention Lorem Ipsum isn't hard as it doesn’t make sense in the first place,that will limit any initial interest soon enough. Try telling a client to ignore draft copy however,and you're up to something you can't win. Whenever draft copy comes up in a meeting confused questions about it ensue.

Summing up,really:

Lorem Ipsum is a tool that can be useful,used intentionally it may help solve some problems. If you go about content strategy the wrong way,fix that problem.</span>
                                    </div>
                                    <div class="col-sm-12 col-md-12 col-lg-12 text-center regard-div" >
                                    <span dir="rtl" class="a-letter-c-end" name="a-letter-c-end">regards</span><br><br>
                                    </div>
                                    <div  id="a-sig" class="col-sm-12 col-md-12 col-lg-12 text-left signature-img" >
                                    signature section
                                    </div>
                                    <div id="a-cp-cover" class="col-sm-12 col-md-12 col-lg-12 text-right cpp-div" >
                                    <span dir="rtl" >
                                    وێنەیەك بۆ/ 
                                    </span>
                                    <ul class="a-cpfor cpp-div" name="a-cpfor" dir="rtl" >
                                        
                                    </ul> 
                                        
                                </div>
                                </div>
                                <div class="my-footer">footer section</div>
                        
                        </div>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-