如何使用HTML5在标题中添加文本

http://img3.mukewang.com/60af70d20001c79e18230245.jpg

我试图在不影响标题大小的情况下将标题中的列表项移动到上方,有人可以告诉我如何做吗?


我的index.html中的代码如下


<header>

  <div id="service-buttons">

    <nav>

      <ul>

        <li><a href="index.html">Unblacklisting</a></li>

        <li><a href="about.html">iCloud Removal</a></li>

        <li><a href="services.html">Clean IMEI</a></li>

        <li><a href="index.html">Buy & Sell</a></li>

        <li><a href="about.html">Reported Lost</a></li>

        <li><a href="services.html">Sim Cards</a></li>

      </ul>

    </nav>

  </div>

</header>

这是我的styles.css中的代码


header #service-buttons {

  margin-top:10px;

}


侃侃尔雅
浏览 237回答 3
3回答

LEATH

你可以试试:header {&nbsp; position: relative;&nbsp; ...}header #service-buttons {&nbsp; position: absolute;&nbsp; bottom: 2px; // change according to your need&nbsp; right: 4px; // change according to your need}

catspeake

尝试设置填充而不是边距:header #service-buttons {&nbsp; padding-top:10px;}
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript