我的html代码如下所示:
<h3>Corruption, the most infallible symptom of constitutional liberty.</h3>
<p>~ Edward Gibbon</p>由此产生的产出如下:

正如我指出的箭头,我不希望爱德华吉本在引用下面,但最好是在“自由”的右边。
如果涉及到h3标记,这有可能吗?我应该使用span或div标记吗?任何指导都将不胜感激!
更新解决方案,以防将来有人需要这个(通过格雷格詹宁斯):
<h3>Corruption, the most infallible symptom of constitutional liberty. <span
class="parastyled" style="font-size: 10px;">~ Edward Gibbon</span></h3>由此产生的产出如下:

发布于 2014-02-19 04:55:25
在标签内使用你想要的样式的跨度。这里需要一个内联元素。
<h3>Corruption, the most infallible symptom of constitutional liberty. <span class="parastyled">~ Edward Gibbon</span></h3>发布于 2014-02-19 04:58:50
就让他们在线吧!
h3, p{
display: inline;
} 注意,您可能不希望这影响到所有的p和h2,所以我会这样做:
<div class="same-line">
<h2>blah balh</h2>
<p>blah</p>
</div>CSS:
.same-line p, .same-line h2{
display:inline;
}发布于 2014-02-19 04:55:54
您可以更改p和h3标记的显示类型。
HTML:
<h3 class="sameline">Corruption, the most infallible symptom of constitutional liberty.</h3>
<p class="sameline">~ Edward Gibbon</p>CSS:
<style type="text/css">
.sameline {
display: inline;
}
</style>https://stackoverflow.com/questions/21871357
复制相似问题