多行锚标记,包括span标记

时间:2015-08-20 14:40:18

标签: html css

我有一个包含多行文字的锚标记,并且在开头有一个包含iconfont的span标记。现在我希望所有文本行都在同一个意图上。我怎样才能做到这一点?

enter image description here

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;
&#13;
&#13;

1 个答案:

答案 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;
}