banner
森钢

森钢SenGun

「この世界は完璧ではないが、私にはちょうどいい」
bluesky
steam
youtube

An Xlog Friendship Link Template Display

<div class="friend-links-row">
  <div class="friend-item">
    <img src="Image Address A" alt="Blog A" />
    <div>
      <strong>
        <a href="https://www.xxx.com/" target="_blank" rel="noopener noreferrer">@Blog Name</a>
      </strong>
      <div>Blog Introduction OZR</div>
    </div>
  </div>
  <div class="friend-item">
    <img src="Image Address B" alt="Blog A" />
    <div>
      <strong>
        <a href="https://www.xxx.com/" target="_blank" rel="noopener noreferrer">@Blog Name</a>
      </strong>
      <div>Blog Introduction OZR</div>
    </div>
  </div>
  <div class="friend-item">
    <img src="Image Address C" alt="Blog C" />
    <div>
      <strong>
        <a href="https://www.xxx.com/" target="_blank" rel="noopener noreferrer">@Blog Name</a>
      </strong>
      <div>Blog Introduction OZR</div>
    </div>
  </div>
</div>

<!-- You can directly copy this entire code block to start a new line -->


Additionally, add CSS:

.friend-links-row {
  display: flex;
  flex-wrap: wrap;              /* Allow wrapping */
  justify-content: center;      /* Center display */
  gap: 24px 16px;               /* Row spacing, column spacing */
  margin-bottom: 30px;
}

.friend-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 220px;                 /* Default width, suitable for most screens */
  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;           /* Key: make strong occupy a full line */
  width: 100%;              /* Key: width 100% */
}

.friend-item strong a {
  color: #222;
  text-decoration: none;
  transition: color 0.2s;
  display: block;           /* Key: make a also occupy a full line */
  text-align: center;       /* Key: center */
  width: 100%;
}

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

/* Responsive: Mobile optimization */
@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;
  }
}

The code is generated by Cursor and has been tested to be effective. If you have any questions, feel free to leave a message below~

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.