0
我對保證金崩潰及其工作原理做了一些研究,但大多數示例都使用親子情況。 我想要保證金的元素(div)沒有父級。保證金坍縮相鄰元素
https://jsfiddle.net/3yaqdyz8/
<center>
<h2>Profile</h2>
Username goes here<br>
Balance: 0.00 <div class="coin coin-1"></div>
</center>
.coin
{
display:inline-block;
margin-top:5px; /*Problem here*/
background: url('http://infrox.us.lt/coin.png');
background-size:cover;
background-repeat:no-repeat;
}
.coin-1
{
height:25px;
width:25px;
}
我需要使圖像DIV(.coin),比文本的其餘部分稍低。相反,它將div移動到旁邊的文本中。我如何只移動圖像div?
謝謝!另外感謝您指出