源代码
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>编程字典</title> <style> p { border: 1px solid black; outline-color:red; } p.dotted {outline-style: dotted;} p.dashed {outline-style: dashed;} p.solid {outline-style: solid;} p.double {outline-style: double;} p.groove {outline-style: groove;} p.ridge {outline-style: ridge;} p.inset {outline-style: inset;} p.outset {outline-style: outset;} </style> </head> <body> <h2>outline-style 属性</h2> <p class="dotted">点线轮廓</p> <p class="dashed">虚线轮廓</p> <p class="solid">实线轮廓</p> <p class="double">双线轮廓</p> <p class="groove">凹槽轮廓</p> <p class="ridge">隆起轮廓</p> <p class="inset">内嵌轮廓</p> <p class="outset">外突轮廓</p> <b>注意:</b> IE8 支持 outline 属性,只有指定 !DOCTYPE . </body> </html>
运行结果