[英]How do i draw lines with HTML CSS?
我已經為我的頁面設置了這種布局。
與此CSS
.carousel-indicators {
position: absolute;
top: 30%;
left: 68%;
z-index: 15;
width: 60%;
padding-left: 0;
margin-left: -30%;
text-align: center;
list-style: none;
}
.carousel-indicators li {
display: inline-block;
width: 40px;
height: 40px;
margin-right: 40px;
text-indent: -999px;
cursor: pointer;
background-color: #000 \9;
background-color: rgba(0, 0, 0, 0);
border: 2px solid #527BBD;
border-radius: 50px;
}
.carousel-indicators .active {
width: 42px;
height: 42px;
margin-right: 40px;
background-color: #D91C23;
}
但是,我需要使用如下連接線來創建滑塊硬幣:
有人可以幫忙嗎? 提前致謝!
由於提到了SVG,因此這里僅舉一個例子:
<svg> <rect x=20 y=20 width=210 height=1 style=stroke:grey /> <circle cx=20 cy=20 r=10 stroke=black stroke-width=1 fill=white /> <circle cx=90 cy=20 r=10 stroke=black stroke-width=1 fill=red /> <circle cx=160 cy=20 r=10 stroke=black stroke-width=1 fill=white /> <circle cx=230 cy=20 r=10 stroke=black stroke-width=1 fill=white /> </svg>
hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid #ccc;
margin: 1em 0;
padding: 0;
}
並在您的html文件中
<div>foo</div>
<hr/>
<div>bar</div>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.