我一直试图通过使用float将bootstrap4中的导航栏移动到屏幕的右侧:right;在导航上,它只是没有做任何事情。我正在使用codepen应用程序为我正在执行的项目编写代码。在引导中将导航栏移动到右侧
HTML代码:
<div class="container-fluid">
<class="row">
<header>
<nav class="navbar navbar-fixed-top">
<a href="#" class="glyphicon glyphicon-user">About</a>
<a href="#" class="glyphicon glyphicon-th-large">Portfolio</a>
<a href="#" class="glyphicon glyphicon-envelope">Contact</a>
</div>
</nav>
</header>
</div>
</div>
</body>
</html>
CSS文件:
@import url('//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css');
nav a {
color: black;
padding: 10px;
font-size: 32px;
background-color: gray;
}
有什么问题吗? –
你能提供codepen吗? –