18910140161

去除div之间的间隙,HTML-删除<div>和<p>标记之间的间距-堆栈溢出

顺晟科技

2022-10-19 13:26:06

43

我正在写一个HTML文档。我试图在p和div之间不留空格。没有包含错误消息。

我已经尝试过:

  • 向p元素和div元素添加0px边距和填充
  • 在代码中不使用空白

代码:

为了澄清起见,问题是明显的空格位于。

中的所有元素之间

顺晟科技:

将其添加到css文件中

#IO-out {
  width: 100%;
  height: 100%;
  margin: 0px;
  padding: 0px;
}

.pn {
  margin: 0px;
  padding: 0px;
}

.t {
  color: white;
  background-color: black;
  font-family: "Roboto Mono", monospace, "wingdings";
}

.t.normal {
  color: white;
  background-color: black;
}

并在标记中添加一些文本..

以下是完整代码

#IO-out {
  width: 100%;
  height: 100%;
  margin: 0px;
  padding: 0px;
}

.pn {
  margin: 0px;
  padding: 0px;
}

.t {
  color: white;
  background-color: black;
  font-family: "Roboto Mono", monospace, "wingdings";
}

.t.normal {
  color: white;
  background-color: black;
}
  • TAG:
相关文章
我们已经准备好了,你呢?
2024我们与您携手共赢,为您的企业形象保驾护航