问题描述
我无法将 titolo
类中的最后一个 div 向右移动。
在带有 titolo
类的 div 中还有 5 个 div。
这 5 个的最后一个 div 应该向右移动。
我想避免使用边距移动
有人可以帮我吗?
非常感谢!!
body {
font-family: 'PT Sans Narrow',sans-serif;
background-color: black;
}
.bannerSup {
background-color: black;
padding: 5px
}
.titolo {
display: flex;
font-size: 1.3em;
padding: 15px;
}
.titolo a {
color: aliceblue;
text-decoration: none;
}
div.titolo>div {
margin-right: 70px;
margin-bottom: -10px;
}
div.titolo>div>a.contatti {
color: red;
}
div.titolo>div:nth-child(5) {
align-self: flex-end;
}
.bannerInf {
border: 10px solid azure;
padding: 20px;
display: flex;
}
#banner1 {
width: 100%;
}
<div class="bannerSup">
<div class="titolo">
<div> <a href="https://www.google.com" target="_blank">PRODottI</a></div>
<div> <a href="https://www.google.com" target="_blank">ABOUT US</a></div>
<div> <a href="https://www.google.com" target="_blank">STORY</a></div>
<div> <a href="https://www.google.com" target="_blank">CONTACTS</a></div>
<div> <a class="contatti">CONTACTS</a></div>
</div>
<div class="bannerInf">
<img id="banner1" src="https://via.placeholder.com/800x100" alt="Immagine Banner">
</div>
</div>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)