gpt4 book ai didi

html - 响应式顶栏

转载 作者:行者123 更新时间:2023-11-28 01:44:46 25 4
gpt4 key购买 nike

我有 2 个导航栏,分别是顶部栏和菜单,菜单是响应式的,但顶部栏不是。如何制作响应式顶部栏(图标和图像)?

<div class="header widget-style1 clearfix">
<div class="container">
<div class="header-wrap clearfix">
<div class="row">
<div class="col-lg-4" style="float: right;">
<div id="" class="">
<a href="/" rel="home">

<img src="{{asset('images/logojipp34.jpg')}}" alt="image">
</a>
</div>
<!-- /. -->
</div>

<div class="col-lg-8">
<div class="page" style="margin-top: 50px">
<div class="row">
<div class="col-md-4 text-right">
<a href="" class="social-media"><i class="fa fa-instagram fa-2x" style="color: #9D2629"></i></a>
</div>
<div class="col-md-4 text-right">
<a href="" class="social-media"><i class="fa fa-facebook-f fa-2x" style="color: #9D2629"></i></a>
</div>
<div class="col-md-4 text-right">
<a href="" class="social-media"><i class="fa fa-twitter fa-2x" style="color: #9D2629"></i></a>
</div>
</div>
</div>

</div>
</div>
</div>
<!-- /.row -->
</div>
<!-- /.header-wrap -->
</div>

我如何使用它进行响应式设计?

最佳答案

你为什么不添加类似的东西

body {margin:0;}

.topbar {
overflow: hidden;
background-color: #333;
position: fixed;
top: 0;
width: 100%;
}

.topbar a {
float: left;
display: block;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}

.topbar a:hover {
background: #ddd;
color: black;
}

.main {
padding: 16px;
margin-top: 30px;
height: 1500px; /* Used in this example to enable scrolling */
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>

</style>
</head>
<body>

<div class="topbar">
<a href="#home">Home</a>
<a href="#news">News</a>
<a href="#contact">FAQ</a>

</body>
</html>

关于html - 响应式顶栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50245485/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com