使用 CSS 設定下邊框樣式
要設定底邊框的樣式,請使用 border-bottom-style 屬性。可以設定邊框值的選項包括點線、雙線、虛線、實線等。
示例
你可以嘗試執行以下程式碼來自定義底邊框
<!DOCTYPE html> <html> <head> <style> p.dotted {border-bottom-style: dotted;} p.double {border-bottom-style: double;} p.dashed {border-bottom-style: dashed;} p.solid {border-bottom-style: solid;} p.inset {border-bottom-style: inset;} p.outset {border-bottom-style: outset;} </style> </head> <body> <p class = "dotted">Dotted bottom border.</p> <p class = "double">Double bottom border.</p> <p class = "dashed">Dashed bottom border.</p> <p class = "solid">Solid bottom border.</p> <p class = "inset">Inset bottom border.</p> <p class = "outset">Outset bottom border.</p> </body> </html>
輸出
廣告