Commit fe1a1ba 1 parent 1f4f81f commit fe1a1ba Copy full SHA for fe1a1ba
File tree 1 file changed +10
-7
lines changed
1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -82,17 +82,20 @@ def get_html_template():
82
82
}}
83
83
.image {{
84
84
margin-top: 10px;
85
- display: flex ;
86
- justify-content: space-around;
87
- align-items: center ; /* 使两张图片垂直对齐 */
88
- padding: 20px;
85
+ display: grid ;
86
+ grid-template-columns: repeat(3, 1fr); /* 将图片分成3列 */
87
+ grid-gap: 10px ; /* 设置图片之间的间距 */
88
+ justify-items: center; /* 居中显示图片 */
89
89
}}
90
90
.image img {{
91
- max-width: 33vw;
92
- max-height: 33vh;
91
+ width: 100%; /* 图片宽度100%填充父容器 */
92
+ height: auto; /* 固定高度150px */
93
+ object-fit: cover; /* 保持比例裁剪图片 */
94
+ max-width: 33vw; /* 限制图片的最大宽度 */
95
+ max-height: 33vh; /* 限制图片的最大高度 */
93
96
border-radius: 10px;
94
97
cursor: pointer;
95
- }}
98
+ }}
96
99
.comments {{
97
100
margin-top: 5px; /* 调整这里的值来减少间距 */
98
101
background-color: #444;
You can’t perform that action at this time.
0 commit comments