一个Xlog友情链接模板展示

友情链接 🥰

Copy





@博客名称

博客简介OZR






@博客名称

博客简介OZR






@博客名称

博客简介OZR






另外加入 CSS：

Copy
.friend-links-row {
display: flex;
flex-wrap: wrap; /* 允许换行 */
justify-content: center; /* 居中显示 */
gap: 24px 16px; /* 行间距、列间距 */
margin-bottom: 30px;
}

.friend-item {
display: flex;
flex-direction: column;
align-items: center;
width: 220px; /* 默认宽度，适合大部分屏幕 */
background: #fff;
border-radius: 16px;
padding: 20px 12px 16px 12px;
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
transition: box-shadow 0.2s;
margin-bottom: 0;
}

.friend-item:hover {
box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

.friend-item img {
width: 80px;
height: 80px;
border-radius: 50%;
object-fit: cover;
border: 2px solid #eee;
margin-bottom: 12px;
display: block;
}

.friend-item strong {
font-size: 1.08em;
color: #222;
margin-bottom: 6px;
text-align: center;
word-break: break-all;
}

.friend-item strong {
font-size: 1.08em;
color: #222;
margin-bottom: 6px;
text-align: center;
word-break: break-all;
display: block; /* 关键：让 strong 占满一行 */
width: 100%; /* 关键：宽度100% */
}

.friend-item strong a {
color: #222;
text-decoration: none;
transition: color 0.2s;
display: block; /* 关键：让 a 也占满一行 */
text-align: center; /* 关键：居中 */
width: 100%;
}

.friend-item div > div {
color: #888;
font-size: 1em;
margin-top: 2px;
text-align: center;
word-break: break-all;
}

/* 响应式：手机端优化 */
@media (max-width: 600px) {
.friend-links-row {
gap: 16px 0;
}
.friend-item {
width: 90vw;
max-width: 340px;
min-width: 0;
margin: 0 auto;
padding: 16px 6px 12px 6px;
}
.friend-item img {
width: 60px;
height: 60px;
}
}

代码由 Cursor 生成，亲测有效。如有问题欢迎在下面留言～