我有一个包含多行文字的锚标记,并且在开头有一个包含iconfont的span标记。现在我希望所有文本行都在同一个意图上。我怎样才能做到这一点?
HTML码:
<div class="controlls">
<p class="catalogue-pdf">
<a href="http://www.google.com/" class="text-link" target="_blank"><span class="icon-pdf"></span> PDF download</a>
<span class="separation-point">·</span> 82,0 kB
</p>
<p class="catalogue-link">
<a href="http://www.google.com/" class="text-link" target="_blank"><span class="icon-book"></span> Stack Overflow Question Two Line Texts</a>
</p>
</div>
&#13;
答案 0 :(得分:0)
这与你的目的有关吗?
HTML:
<p class="catalogue-link">
<a href="http://www.google.com/" class="text-link" target="_blank">
<span class="icon-book"></span>
<span class="link-text">Stack Overflow Question Two Line Texts</span>
</a>
</p>
CSS:
.catalogue-link a {
display: flex;
align-items: flex-start;
}
.catalogue-link .link-text {
margin-top: 15px;
margin-left: 0.5rem;
}