源代码
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>编程字典</title> <style> p.normal { border: 2px solid red; } p.round1 { border: 2px solid red; border-radius: 5px; } p.round2 { border: 2px solid red; border-radius: 8px; } p.round3 { border: 2px solid red; border-radius: 12px; } </style> </head> <body> <h2>border-radius 属性</h2> <p>此属性用于向元素添加圆角边框:</p> <p class="normal">默认边框</p> <p class="round1">圆角边框</p> <p class="round2">比较圆边框</p> <p class="round3">最圆角边框</p> <p><b>注意:</b> IE8和早期版本不支持 "border-radius" 属性</p> </body> </html>
运行结果