Bootstrap 4 .border-0 class
在Bootstrap中使用border-0类消除元素的所有边界,如下所示:
1 | No border |
我们还在上面设置了CSS样式:
1 2 3 4 5 6 | .mystyle { width: 120px; height: 100px; margin: 10px; background: gray; } |
您可以尝试运行以下代码来实现border-0类:
现场演示
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | <!DOCTYPE html> <html lang="en"> <head> Bootstrap Example <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"> <style> .mystyle { width: 120px; height: 100px; margin: 10px; background: gray; } </style> </head> <body> <p> Two Rectangles </p> orange border No border </body> </html> |