You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

求助:如何用CSS3实现由小圆点连接的三个圆形?

Hey there! I totally get what you’re going for—three circles connected by small dots instead of the solid lines from that CSS3 circles tutorial. Let’s build this out with a clean, flexible CSS-only solution that’s easy to tweak to your needs.

Option 1: Multiple Small Dots as Connectors

This works if you want a string of dots linking each pair of circles:

HTML

<div class="circle-group">
  <div class="circle">1</div>
  <div class="dot-chain">···</div>
  <div class="circle">2</div>
  <div class="dot-chain">···</div>
  <div class="circle">3</div>
</div>

CSS

/* Container to align everything horizontally */
.circle-group {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 2rem;
}

/* Style for the main circles */
.circle {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: #3498db;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
}

/* Chain of small connecting dots */
.dot-chain {
  font-size: 1.8rem;
  letter-spacing: 6px;
  color: #3498db;
  /* Adjust letter-spacing to control gap between individual dots */
}

Option 2: Single Dot as Separator

If you just want a single, prominent dot between each circle (like a visual divider), this is even simpler:

HTML

<div class="circle-group">
  <div class="circle">A</div>
  <span class="single-dot">·</span>
  <div class="circle">B</div>
  <span class="single-dot">·</span>
  <div class="circle">C</div>
</div>

CSS

.circle-group {
  display: flex;
  align-items: center;
  padding: 2rem;
}

.circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #e74c3c;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.single-dot {
  font-size: 2.2rem;
  color: #e74c3c;
  margin: 0 1.5rem;
  /* Adjust margin to control space between circle and dot */
}

Quick Customization Tips

  • Swap out the background value on .circle and color on dot elements to match your brand palette.
  • Resize the main circles by adjusting their width and height.
  • Tweak letter-spacing (for multi-dot chains) or margin (for single dots) to fine-tune spacing between elements.
  • Add hover effects or transitions to the dot classes if you want interactive behavior (e.g., transition: color 0.3s ease;).

This approach is lightweight, JS-free, and easy to drop into any project. Let me know if you need help adjusting anything to fit your exact design!

内容的提问来源于stack exchange,提问作者user3233787

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 07:50:27