我尝试了float=right,可是实现不来搜索栏和百度图标在右边现实
实现方式有很多
1、使用浮动布局float
2、使用弹性布局flex
3、使用定位position
<style>
.content{
display:flex;
justify-content: space-between;
}
.logo{
width: 200px;
height: 150px;
border: 1px solid;
}
.search{
width: 300px;
height: 150px;
border: 1px solid;
}
</style>
<body>
<header>
<div class="content">
<div class="logo"></div>
<div class="search">
<input type="text"/>
<img src="baidu.icon">
</div>
</div>
</header>
</body>
建议使用弹性布局最方便
啊?我没太明白什么意思,是百度的logo在搜索框里面的右边还是?
input 设置 圆角 背景色 outline