用大佬的话来说,做一个这样的图片虽然简单,但是如果需要二次修改就比较费事,但是如果是代码版的,那就改一下就好啦,这不,下面就是大佬分享的代码:
<div class="card">
<div style="
height: 140px;
width: 248px; /* 修改宽度为280px */
background-color: #e1eeff;
color: #fff;
display: flex;
border-radius: 2px;
overflow: hidden;
font-family: '汉仪旗黑', sans-serif;
margin: 10px; /* 添加10px的外边距 */
">
<div style="
width: 120px; /* 修改为120px */
height: 120px;
display: flex;
justify-content: center;
align-items: center;
padding: 10px;
">
<img src="二维码路径地址" alt="QR Code" style="
width: 100%;
height: 100%;
display: block;
object-fit: contain;
">
</div>
<div style="
flex-grow: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
">
<div style="margin-bottom: 20px; font-weight: bold; color: #000; font-size: 18px;">学院交流群</div>
<div style="
width: 120px; /* 右侧容器宽度修改为120px */
height: 30px;
background-color: #fff;
color: #000;
text-align: center;
line-height: 30px;
font-size: 16px;
border: none;
border-radius: 5px;
">294962666</div>
</div>
</div></div>
源码来源于:https://www.dalao.net/thread-27310.htm
本学院根据学院风格修改了一宽度。