MrS*_*1ck 5 css text alignment
基本上,我想在同一行上有一个h1和ap元素,但是对齐方式偏离很多(这意味着H1高于P并看上去很cr脚),而且我之前从未用css做类似的事情!
我已经将jsfiddle组合在一起,这是代码:
<h1 style="float:left;display:inline;">"Hi!</h1><p style="float:left;display:inline;">I'm James, and I <strong>LOVE</strong> building clean, fast and (most importantly) effective websites. Oh, and I also know a thing or two about computers.</p><h1 style="float:left;display:inline">"</h1>
Run Code Online (Sandbox Code Playgroud)
谢谢!
回答之前的一些建议:
试试这个,让我知道是否可以works
HTML:
<h1 >"Hi!</h1><p>I'm James, and I <strong>LOVE</strong> building clean, fast and (most importantly) effective websites. Oh, and I also know a thing or two about computers.</p><h1>"</h1>
Run Code Online (Sandbox Code Playgroud)
CSS:
p
{
display:inline;
}
h1{
display:inline
}
Run Code Online (Sandbox Code Playgroud)