Getting rid of all the rounded corners in Twitter Bootstrap

后端 未结 16 2362
旧时难觅i
旧时难觅i 2020-12-22 17:07

I love Twitter Bootstrap 2.0 - I love how it\'s such a complete library... but I want to make a global modification for a very boxy-not-round site, which is to get rid of al

相关标签:
16条回答
  • 2020-12-22 17:52

    if you are using bootstrap you can just use the bootstrap class="rounded-0" to make the border with the sharp edges with no rounded corners <button class="btn btn-info rounded-0"">Generate</button></span>

    0 讨论(0)
  • 2020-12-22 17:53

    With SASS Bootstrap - if you are compiling Bootstrap yourself - you can set all border radius (or more specific) simply to zero:

    $border-radius:               0;
    $border-radius-lg:            0;
    $border-radius-sm:            0;
    
    0 讨论(0)
  • 2020-12-22 17:56

    If you are using Bootstrap version < 3...

    With sass/scss

    $baseBorderRadius: 0;
    

    With less

    @baseBorderRadius: 0;
    

    You will need to set this variable before importing the bootstrap. This will affect all wells and navbars.

    Update

    If you are using Bootstrap 3 baseBorderRadius should be border-radius-base

    0 讨论(0)
  • 2020-12-22 17:57

    If you want to avoid recompiling the all thing, just add .btn {border-radius: 0;} to your CSS.

    0 讨论(0)
  • 2020-12-22 17:59

    Bootstrap has it's own classes for borders including .rounded-0 to get rid of rounded corners on any element including buttons

    https://getbootstrap.com/docs/4.4/utilities/borders/#border-radius

    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet"/>
    <a class="btn btn-primary">Regular Rounded Corners</a>
    <a class="btn btn-primary rounded-pill">Pill Corners</a>
    <a class="btn btn-primary rounded-0">Square Corners</a>

    0 讨论(0)
  • 2020-12-22 18:05

    There is a very easy way to customize Bootstrap:

    1. Just go to http://getbootstrap.com/customize/
    2. Find all "radius" and modify them as you wish.
    3. Click "Compile and Download" and enjoy your own version of Bootstrap.
    0 讨论(0)
提交回复
热议问题