<div class="SNS">
<ul>
<li>
<a href="https://twitter.com">
<img src="img/Twitter.jpg" alt="Twitter icon" width="20" height="20">
</a>
</li>
</ul>
</div>
我想用CSS在我的实践html文档的右侧设置twitter徽标
最简单的方法是使用CSS向元素添加“float:right”属性。 (通过使用HTML样式属性或直接使用CSS)
这里有一个很好的参考资料,可以帮助您将元素与CSS对齐:W3Schools
<div class="SNS">
<ul>
<li style="float:right"> <!--Change here-->
<a href="https://twitter.com">
<img src="twitter.png" alt="Twitter icon" width="20" height="20">
</a>
</li>
</ul>
</div>