bootstrap border radius class – Askavy

0
8

Views: 20

classes to an element to easily round element corners

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Bootstrap 5 Form Example</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <div class="container py-3">
        <div class="row justify-content-center">
            <div class="col-md-6">
                <button class="btn btn-primary rounded-0">rounded-0 Class</button>
                <button class="btn btn-primary rounded-1">rounded-1 Class</button>
                <button class="btn btn-primary rounded-2">rounded-2 Class</button>
                <button class="btn btn-primary rounded-3">rounded-3 Class</button>
                <button class="btn btn-primary rounded-4">rounded-4 Class</button>
                <button class="btn btn-primary rounded-5">rounded-5 Class</button>
            </div>
        </div>
    </div>
</body>
</html>

Buttons using border radius

1 10
<!DOCTYPE html>
<html lang="en">

<head>
    <title>Bootstrap 5 Form Example</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
        .button1 
            border-radius: 2px;
        

        .button2 
            border-radius: 4px;
        

        .button3 
            border-radius: 8px;
        

        .button4 
            border-radius: 12px;
        

        .button5 
            border-radius: 50%;
        
    </style>
</head>

<body>
    <div class="container py-3">
        <div class="row justify-content-center">
            <div class="col-md-12">
                <button class="btn btn-primary button1">2px</button>
                <button class="btn btn-primary button2">4px</button>
                <button class="btn btn-primary button3">8px</button>
                <button class="btn btn-primary button4">12px</button>
                <button class="btn btn-primary button5">50%</button>
            </div>
        </div>
    </div>
</body>

</html>

Let us know if you liked the post. That’s the only way we can improve.

Source

LEAVE A REPLY

Please enter your comment!
Please enter your name here