bs4 4 Grid rem Demo

Bootstrap snippet. bs4 4 Grid rem Demo, this snippet was created to help web designers,
front-end developers and back-end developer save time. Use it in your project and build your app faster,
You can also download the HTML, CSS, and JS code.

HTML code

Copy, paste, change, customize and run the following HTML code to get a result like the one shown in the preview selection

<div class="font-sizes">
    <h2 class="display-1">Bootstrap 4 Grid "rem" Demo</h2>
    <h4>Click a size to change the <code>html</code> tag's font size</h4>
     <a href="#" class="btn btn-sm btn-primary-outline" data-size="6px">8px</a> 
    <a href="#" class="btn btn-sm btn-primary-outline" data-size="12px">12px</a>
    <a href="#" class="btn btn-sm btn-primary-outline" data-size="16px">16px</a>
    <a href="#" class="btn btn-sm btn-primary-outline" data-size="20px">20px</a>
    <a href="#" class="btn btn-sm btn-primary-outline" data-size="24px">24px</a>
    <a href="#" class="btn btn-sm btn-primary-outline" data-size="28px">28px</a> 
    <a href="#" class="btn btn-sm btn-primary-outline" data-size="32px">32px</a> 
</div>

<div class="container">
    <div class="row">
        <div class="col-md-1">.col-md-1</div>
        <div class="col-md-1">.col-md-1</div>
        <div class="col-md-1">.col-md-1</div>
        <div class="col-md-1">.col-md-1</div>
        <div class="col-md-1">.col-md-1</div>
        <div class="col-md-1">.col-md-1</div>
        <div class="col-md-1">.col-md-1</div>
        <div class="col-md-1">.col-md-1</div>
        <div class="col-md-1">.col-md-1</div>
        <div class="col-md-1">.col-md-1</div>
        <div class="col-md-1">.col-md-1</div>
        <div class="col-md-1">.col-md-1</div>
    </div>
    <div class="row">
        <div class="col-md-8">.col-md-8</div>
        <div class="col-md-4">.col-md-4</div>
    </div>
    <div class="row">
        <div class="col-md-4">.col-md-4</div>
        <div class="col-md-4">.col-md-4</div>
        <div class="col-md-4">.col-md-4</div>
    </div>
    <div class="row">
        <div class="col-md-6">.col-md-6</div>
        <div class="col-md-6">.col-md-6</div>
    </div>
</div>

CSS code

Copy, paste, change, customize and run the following CSS code to get a result Like the one shown in the preview selection

html {
  font-size: 16px;
}
[class^="col"] {
    background: rgba(152, 214, 245, 0.73);
    border: 1px solid rgba(86,61,124,.2);
    min-height: 50px;
}
.font-sizes {
    text-align: center;
    padding: 30px 0;
}
                                    

Javascript/Jquery code

Copy, paste, change, customize and run the following JS code to get a result Like the one shown in the preview selection

$('.font-sizes a').click(function() {
    $('html').css('font-size', $(this).data('size'));
    return false;
}); 

Similar snippets

Bootstrap snippet bs4 project list with progress

bs4 project list with progress

View

Bootstrap snippet bs4 Home Contacts

bs4 Home Contacts

View

Bootstrap snippet bs4 widget image cards

bs4 widget image cards

View

About this snippet

Creator: Dey Dey

Bootstrap version: 4.0.0

Created: Mar 1st 2018, 13:18

Views: 129