我正在嘗試使用包含多個點的 CSS 來建立一條垂直線。但是,我不太確定該怎麼做。
有人可以幫我解決這個問題嗎?
我想在這裡創建一個像這樣的東西。
P粉3767388752024-02-22 09:50:25
您可以在此處使用 SVG 圖像。
P粉1327308392024-02-22 09:04:39
我希望下面的程式碼能幫助您解決問題。如果您需要更多,您可以使用 垂直精靈
進行 Google 搜尋並取得以下附加程式碼:
ul { list-style: none; margin: 0; padding: 0; position: relative; } ul:before { content: ""; display: inline-block; width: 2px; background: red; position: absolute; left: 3px; top: 5px; height: calc(100% - 10px); } ul li { position: relative; padding-left: 15px; margin-bottom: 15px; } ul li:before { content: ""; display: inline-block; width: 8px; height: 8px; background: red; position: absolute; left: 0; top: 5px; border-radius: 10px; }