我想在不影响标题大小的情况下将列表项移动到上面的标题中,有人能告诉我怎么做吗?
我的 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;
}
最佳答案
你可以试试:
header {
position: relative;
...
}
header #service-buttons {
position: absolute;
bottom: 2px; // change according to your need
right: 4px; // change according to your need
}
关于javascript - 如何使用 HTML5 在标题中添加文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56096908/