为什么 blockquote 在它的末尾添加一个额外的 br,我该如何避免它?我如何删除添加的额外 br,以便我的所有行都在一起>
.container-content .main-content .container-test pre {
font-family: monospace;
white-space: pre;
word-break: break-all;
color: #ececec;
border: none;
padding: 0;
background-color: transparent;
}
blockquote {
padding: 0px 10px 0px;
margin: 0 0 0px;
border-left: 3px solid #2471A3;
}
<div class="container-test">
<pre>
test test tesst
test test tesst
test test tesst
test test tesst
<blockquote>test test tesst
test test tesst
test test tesst
test test tesst</blockquote>
test test tesst
test test tesst
test test tesst
test test tesst
</pre>
</div>
将 blockquote 的显示属性(请使用更好的选择器)设置为 inline-block。
.container-test pre {
font-family: monospace;
white-space: pre;
word-break: break-all;
}
.container-test pre blockquote {
padding: 0px 10px 0px;
margin: 0 0 0px;
border-left: 3px solid #2471A3;
display:inline-block;
}
<div class="container-test">
<pre>
test test tesst
test test tesst
test test tesst
test test tesst
<blockquote>test test tesst
test test tesst
test test tesst
test test tesst </blockquote>
test test tesst
test test tesst
test test tesst
test test tesst
</pre>
</div>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句