这里的背景图片一直弄不好
来源:5-2 项目作业
木_人
2021-04-04 14:59:01
personinfo.art
<div class="personinfo">
<div class='personinfo-tx'>
<img src="./images/portrait.png" alt="" class="personinfo-img">
</div>
<div class="personinfo-name">王豆豆</div>
<div class="personinfo-tel">18911023266</div>
</div>
personinfo.css
.personinfo{
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
background-color: #fff;
padding: 20px 0 20px 0;
justify-content: center;
background: url('./images/bg.png') no-repeat ;
background-size: cover;
}
.personinfo-tx{
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.personinfo-name{
font-size: 20px;
color: #203152;
margin-bottom: 2px;
}
.personinfo-tel{
font-size: 14px;
color: #7C8698;
}
1回答
好帮手慕言
2021-04-05
同学你好,把background-size: cover;样式去掉之后再测试。另外:这是一个项目作业,同学完成之后可以上传作业,新建文档,说明问题,批作业的老师会针对你的完整项目给出详细的批复建议,并整理成文档发送给同学,便于同学查看与修改,祝学习愉快~
相似问题