border-radius可以将button变成圆形,也可以给div加有弧度边框
border-radius 规则:
一个值: 四个圆角值相同
二个值: 四个圆角值相同
三个值: 第一个值为左上角与右下角,第二个值为右上角与左下角
四个值: 第一个值为左上角, 第二个值为右上角和左下角,第三个值为右下角
五个值: 第一个值为左上角,第二个值为右上角,第三个值为右下角,第四个值为左下角。
样式:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> .btn{ width: 100px; height: 30px; background: green; border: none; color: white; margin: 6px 10px; } .btnStyle1{ border-radius: 346px 346px 346px 346px; } .btnStyle2{ border-radius: 6px; } .btnStyle3{ border-radius: 26px 6px; } .btnStyle4{ border-radius: 6px 26px 60px; } .btnStyle5{ border-radius: 6px 126px 236px 346px; } .bolder{ border: solid 1px green; width: 500px; height: 40px; border-radius: 10px; } </style> </head> <body> <div class="bolder"><a href="https://www.iqiyi.com/u/349644634731268/videos" target="_blank"> <button class="btn btnStyle1">爱奇艺</button> </div> <div class="bolder"><a href="https://v.qq.com/s/videoplus/363337238" target="_blank"> <button class="btn btnStyle2">腾讯视频</button>