当“pic1”中的屏幕较宽时,灰色文本框位于右侧,徽标位于左侧 .
我想只将文本向下移动到框的中心 .
但是通过移动文本我不希望灰色背景在页面的纵向/移动视图上变得更大,就像在屏幕截图“pic2”上一样
CSS
.box {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.logo {
text-align: center;
width: 200px;
height: 300px;
background-color: rgb(255, 91, 91);
}
.title {
text-align: center;
color: rgb(0, 0, 0);
background-color: rgba(0, 0, 0, 0.2);
}
HTML
This is Logo
This is H1 Text Box with Gray Background
This is H3 Text Box with Gray Background
PIC1
PIC2