Skip to content

Commit fe1a1ba

Browse files
committed
QZoneMemo v1.6
Turn pictures in the Moments into a nine-grid format 修改说说图片为九宫格格式
1 parent 1f4f81f commit fe1a1ba

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

utils/ToolsUtil.py

+10-7
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,20 @@ def get_html_template():
8282
}}
8383
.image {{
8484
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; /* 居中显示图片 */
8989
}}
9090
.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; /* 限制图片的最大高度 */
9396
border-radius: 10px;
9497
cursor: pointer;
95-
}}
98+
}}
9699
.comments {{
97100
margin-top: 5px; /* 调整这里的值来减少间距 */
98101
background-color: #444;

0 commit comments

Comments
 (0)