<html> <head> <style type="text/css"> p { border-style:solid; } p.none {border-top-style:none} p.dotted {border-top-style:dotted} p.dashed {border-top-style:dashed} p.solid {border-top-style:solid} p.double {border-top-style:double} p.groove {border-top-style:groove} p.ridge {border-top-style:ridge} p.inset {border-top-style:inset} p.outset {border-top-style:outset} </style> </head> <body> <p class="none">No top border.</p> <p class="dotted">A dotted top border.</p> <p class="dashed">A dashed top border.</p> <p class="solid">A solid top border.</p> <p class="double">A double top border.</p> <p class="groove">A groove top border.</p> <p class="ridge">A ridge top border.</p> <p class="inset">An inset top border.</p> <p class="outset">An outset top border.</p> </body> </html>
本文案例为大家展示了《如何设置上边框的样式》的代码,若要看代码效果请大家点击“运行代码”按钮。
[code]<html> <head> <style type=”text/css”> p { border-style:solid; } p.none {border-top-style:none} p.dotted {border-top-style:dotted} p.dashed {border-top-style:dashed} p.solid {border-top-style:solid} p.double {border-top-style:double} p.groove {border-top-style:groove} p.ridge {border-top-style:ridge} p.inset {border-top-style:inset} p.outset {border-top-style:outset} </style> </head> <body> <p class=”none”>No top border.</p> <p class=”dotted”>A dotted top border.</p> <p class=”dashed”>A dashed top border.</p> <p class=”solid”>A solid top border.</p> <p class=”double”>A double top border.</p> <p class=”groove”>A groove top border.</p> <p class=”ridge”>A ridge top border.</p> <p class=”inset”>An inset top border.</p> <p class=”outset”>An outset top border.</p> </body> </html>[/code]