代码如下
<style>
.head{
position: relative;
}
input{
position:absolute;
width:85%;
height: 30px;
text-algin:center;
border:1px solid #7FCCOB;
border-radius: 15px;
margin:15px 20px;
background-color: #fff;
opacity: 0.6; // 设置透明度 数字越小透明度越高
}
.photo img{
width:100%;
height:200px;
border-bottom-left-radius: 40%;
border-bottom-right-radius: 40%;
overflow:hidden;
}</style>
<div>
<div class="head">
<input type="" name="" id="" value="" placeholder=" 月饼"/>
</div>
<div class="photo">
<img src="https://main.5iximai.com/attachment/images/3/fuli/120/m3kdK37wVUUK73UkQsdNduS6k308L3.jpg" width="100%" alt="微信图片_20220823154149.jpg"/>
</div>
</div>