【发布时间】:2022-02-16 02:40:18
【问题描述】:
this is what I want to achieve
我尝试这样做,但无法更改破折号之间的间距。 此外,圆圈和虚线的大小不会根据屏幕大小而变化。
这是我到目前为止所做的: see the gap difference between the dashes
代码如下:
<div id="getStarted" className={styles.getStarted}>
<h3>How to get started?</h3>
<div className={styles.Icons}>
<div className={styles.circle}>
</div>
<div className={styles.dash}></div>
<div className={styles.circle}>
</div>
<div className={styles.dash}></div>
<div className={styles.circle}>
</div>
</div>
</div>
这是 CSS 样式:
.getStarted {
justify-content: center;
align-items: center;
text-align: center;
h3 {
color: #006ebe;
font-size: 2.3vw;
margin-bottom: 100px;
}
.Icons {
gap: 2vw;
display: flex;
justify-content: center;
.circle {
border-radius: 50%;
width: 20px;
height: 20px;
padding: 10px;
background: #0093ff;
border: 3px solid #0093ff;
color: white;
text-align: center;
font: 20px Poppins, sans-serif;
font-weight: 600;
line-height: 22px;
}
.dash {
width: 10%;
border-top: 4px dotted #006ebe;
margin-top: 20px;
transform: rotate(-0.07deg);
}
}
}
【问题讨论】:
标签: html css reactjs sass styling