问题描述
我已经看了又看,并尝试了不同的 CSS 变体,但到目前为止都没有成功。
不确定这是否可能,但尝试在无序列表项中包含 H4 和内容。
我可以将 H4 添加到列表项中,但在标题之后,内容继续从下一行开始,如“我一直在获取示例的问题模型”所示。我试图将内容与H4保持在同一行,如果字符太多,则文本可以转到下一行。
代码示例
<ul>
<li><h4>H4 Headline</h4> - This is the text that will start on the same line as the headline. This is the text that will start on the same line as the headline. This is the text that will start on the same line as the headline.</li>
<li><h4>H4 Headline</h4> - This is the text that will start on the same line as the headline. This is the text that will start on the same line as the headline. This is the text that will start on the same line as the headline.</li>
<li><h4>H4 Headline</h4> - This is the text that will start on the same line as the headline. This is the text that will start on the same line as the headline. This is the text that will start on the same line as the headline.</li>
</ul>
我需要的样机示例
关于如何实现这一目标有什么建议吗?
解决方法
您需要做的就是在 CSS 部分使用以下内容
h4{
display: inline;
}