gpt4 book ai didi

html - 我的 CSS 现在不起作用,因为我使用了 <!--nextpage--> 来拆分我的页面

转载 作者:太空宇宙 更新时间:2023-11-04 12:25:54 25 4
gpt4 key购买 nike

这是我的 CSS 在页面上的样子。

<!DOCTYPE html>
<html>


<head>
<style>
p.addresscenter {
background-color: none;
color: #333;
font-family: Lato, sans-serif;
font-size: 15px;
font-weight: 400;
font-style: normal;
line-height: 1.2;
margin: 0;
text-align: center;
white-space: pre;
}
p.endtagbold {
background-color: none;
color: #000000;
font-family: Lato, sans-serif;
font-size: 16px;
font-weight: 600;
font-style: normal;
line-height: 1.2;
margin: 0;
padding-top:16px;
}
p.hoursofoperationcenter {
background-color: none;
color: #333;
font-family: Lato, sans-serif;
font-size: 15px;
font-weight: 400;
font-style: normal;
line-height: 1.3;
margin: 0;
text-align: center;
white-space: pre;
}
p.infop {
background-color: none;
color: #OOOOOO;
font-family: Lato, sans-serif;
font-size: 16px;
font-weight: normal;
font-style: normal;
line-height: 1.5;
margin: 0;
padding-bottom:30px;
}
p.infostextbox {
background-color: none;
color: #OOOOOO;
font-family: Lato, sans-serif;
font-size: 16px;
font-weight: 550;
font-style: normal;
line-height: 1.5;
margin: 0;
padding-bottom:16px;
}
p.topmenu {
background-color: none;
font-family: Lato, sans-serif;
font-size: 15px;
font-weight: 500;
font-style: normal;
line-height: 1.4;
margin: 0;
text-align: center;

}
p.towncounty {
background-color: none;
color: #000000;
font-family: Lato, sans-serif;
font-size: 16px;
font-weight: 700;
font-style: italic;
line-height: 1.4;
margin: 0;
padding-top:16px;
}


</style>
</head>
<body>


<p class="topmenu">Text with id tags here.</p>

这里有一组用这些标签制作的列

 <div class="one-half first">Text</div>
<div class="one-half"> Text </div>

然后有更多的文本由 <p class=""></p> 制定最后是 <!--nextpage-->属性出现在中间某处。

<!--nextpage-->之后标签我有更多的文字 <p class=""></p>

整个页面以

结尾
</body>
</html>

在我未拆分的其他页面上,CSS 显示正常。无论出于何种原因,css 都没有出现在 <!--nextpage--> 之后的第 2 页上。 .我必须做什么才能确保 css 显示在 <!--nextpage--> 之前和之后属性。

最佳答案

我不确定我是否理解所有内容,但你应该尝试放置 <!--nextpage-->在标签之间,而不是标签内部。

例如:

<p>asdasd</p><!--nextpage--><p>asdasd</p>

没问题,而:

<p>asdasd<!--nextpage-->asdasdasd</p>

不行。我希望是这种情况,如果不是,请不要投票并使用完整代码更新您的问题。然后我会尝试更新我的答案。


再多说几句。当您单击下一页时,段落元素已在前一页开始。所以在实际页面上没有段落开头,只有:asdasdasd</p>这导致了问题,并且不是有效的 html。

最好的问候。

关于html - 我的 CSS 现在不起作用,因为我使用了 &lt;!--nextpage--> 来拆分我的页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28013843/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com