gpt4 book ai didi

javascript - 任何人都有使用 css 和 html 创建它的简单方法?

转载 作者:行者123 更新时间:2023-12-01 07:06:18 24 4
gpt4 key购买 nike

enter image description here

我已经使用以下代码完成了此操作,但我认为这是一种很难做到的方法,任何人都可以通过 css 和 html 轻松创建此操作。

.fline {
width: 2px;
background-color: black;
height: 10px;
margin-left: 30%;
margin-top: -9px;
}

.fline1 {
width: 2px;
background-color: black;
height: 10px;
margin-left: 60%;
margin-top: -10px;
}

.fline2 {
width: 2px;
background-color: black;
height: 10px;
margin-left: 88.2%;
margin-top: -11px;
}
<hr style="width: 300px;margin-left: 30%;color:black">
<div class="fline"></div>
<div class="fline1"></div>
<div class="fline2"></div>

最佳答案

.scale-container {
width: 300px;
}

.scale {
width: 296px;
height: 20px;
border: 2px solid black;
border-bottom: none;
}

.scale>div {
width: 50%;
height: 20px;
border-right: 2px solid black;
}

.label-container {
width: 100%;
display: flex;
justify-content: space-between;
}
<div class="scale-container">
<div class="scale">
<div></div>
</div>
<div class="label-container">
<div>Low</div>
<div>Average</div>
<div>High</div>
</div>
</div>

关于javascript - 任何人都有使用 css 和 html 创建它的简单方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59763732/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com