content logo

Bootstrap Buttons:

Bootstrap Button with Particle Fireworks and Glow Effect

In this post, you can see one of the most fantastic codes with a different design. It is the Bootstrap Button with Particle Fireworks and Glow Effect, and you can use it on your website. This code, which contains the HTML Button with Fireworks, is totally black and looks like a great idea for utilizing websites with dark themes. Besides its dark appearance, this code is certainly simple and, as a result, fits with most websites. So, there is no concern while using this unique code.

There is a preview of this BS Button Hover Effect down. By looking at this preview, you can realize that the background of this code is black with white text. The title of this code has a larger font size, and there is a button in the center of the page. This HTML Button with Fireworks is black with a thin border, and its text is white. It is so simple at first glance. As soon as you put the mouse on this button, you will face an attractive hover effect with a colorful design. It contains various colors that move at high speed. The Button Glow Effect will disappear smoothly when you put the mouse away.

#

Colorful Particles in Button

#

BS Button Hover Effect

#

HTML Button with Fireworks

#

Button Glow Effect

<!-- This script got from frontendfreecode.com -->
<br /> 
<h3 class="TU">Particle Button & Glow effect</h3>
<br /><br /><br />
<p>
  <button id="button" class="BT-OH-BR-R6-NF-FH-FP-TU-PT">
      <canvas id="canvas"></canvas> 
      <hover></hover>
      <span>Hover for Awesomeness</span>     
  </button>
</p>
<br /><br /><br /><br /><br /><br /><br /><br /><a style="font-size: 8pt; text-decoration: none" target="_blank" href="http://frontendfreecode.com">Free Frontend</a>
                                                                            
html, body {
    heigth: 100%;
    width: 100%;
    min-height: 100%;
    position: relative;
    oberflow: hidden;
    color: #fff;
}
body {
    background: #45484d; /* Old browsers */
    background: -moz-radial-gradient(center, ellipse cover, #45484d 0%, #000000 100%); /* FF3.6+ */
    background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#45484d), color-stop(100%,#000000)); /* Chrome,Safari4+ */
    background: -webkit-radial-gradient(center, ellipse cover, #45484d 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
    background: -o-radial-gradient(center, ellipse cover, #45484d 0%,#000000 100%); /* Opera 12+ */
    background: -ms-radial-gradient(center, ellipse cover, #45484d 0%,#000000 100%); /* IE10+ */
    background: radial-gradient(ellipse at center, #45484d 0%,#000000 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', endColorstr='#000000',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
    text-align: center;
}
[class*="BT"] {
    width: 250px;
    display: block;
    position: absolute;
    padding: 0;
    border-color: #0e0e0e;
    margin: 0 0 10px;
    line-height: 6px;
    border-style: solid;
    left: 50%;
    margin-left: -125px;
    height: 60px;
}
[class*="BT"] hover {
    position: absolute;
    z-index: 5;
    width: 246px;
    margin-left: -370px;
    transition: all 0.3s ease-out 0s;
    background: -moz-linear-gradient(45deg, rgba(255,255,255,0) 0%, rgba(135,135,135,0.38) 50%, rgba(255,255,255,0) 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,rgba(255,255,255,0)), color-stop(50%,rgba(135,135,135,0.38)), color-stop(100%,rgba(255,255,255,0))); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(45deg, rgba(255,255,255,0) 0%,rgba(135,135,135,0.38) 50%,rgba(255,255,255,0) 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(45deg, rgba(255,255,255,0) 0%,rgba(135,135,135,0.38) 50%,rgba(255,255,255,0) 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(45deg, rgba(255,255,255,0) 0%,rgba(135,135,135,0.38) 50%,rgba(255,255,255,0) 100%); /* IE10+ */
    background: linear-gradient(45deg, rgba(255,255,255,0) 0%,rgba(135,135,135,0.38) 50%,rgba(255,255,255,0) 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#00ffffff',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
    height: 60px;
    margin-top: -30px;
}
[class*="OH"] {
    overflow: hidden;
}
[class*="BR"] {
    border-width: 2px;
}
[class*="R6"] {
    border-radius: 6px;
}
[class*="NF"] {
    background: transparent;
}
[class*="BT"]:hover hover {
    margin-left: 123px;
}
[class*="TU"] {
    text-transform: uppercase;
}
[class*="PT"] {
    cursor: pointer;
}
[class*="BT"] span {
    position: absolute;
    width: 200px;
    margin-left: -100px;
    z-index: 3;
}
canvas {
    margin: 0;
    padding: 0;
    display: block;
    position: absolute;
    margin-top: -30px;
}
(function () {
    var lastTime = 0;
    var vendors = ['ms', 'moz', 'webkit', 'o'];
    for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
        window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
        window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame']
            || window[vendors[x] + 'CancelRequestAnimationFrame'];
    }
    if (!window.requestAnimationFrame)
        window.requestAnimationFrame = function (callback, element) {
            var currTime = new Date().getTime();
            var timeToCall = Math.max(0, 16 - (currTime - lastTime));
            var id = window.setTimeout(function () { callback(currTime + timeToCall); },
                timeToCall);
            lastTime = currTime + timeToCall;
            return id;
        };
    if (!window.cancelAnimationFrame)
        window.cancelAnimationFrame = function (id) {
            clearTimeout(id);
        };
}());
(function () {
    var startBtn = document.getElementById('button');
    var requestID;
    var canvas = document.getElementById('canvas');
    var ctx = canvas.getContext('2d');
    var posX = 0;
    var W = 246;
    var H = 60;
    var circles = [];
    canvas.width = 246;
    canvas.height = 60;
    function animate() {
        requestID = requestAnimationFrame(animate);
        ctx.fillStyle = "rgba(0,0,0,0.15)";
        ctx.fillRect(0, 0, W, H);
        for (var j = 0; j < circles.length; j++) {
            var c = circles[j];
            ctx.beginPath();
            ctx.arc(c.x, c.y, c.radius, 0, Math.PI * 2, false);
            ctx.fillStyle = "rgba(" + c.r + ", " + c.g + ", " + c.b + ", 0.5)";
            ctx.fill();
            c.x += c.vx;
            c.y += c.vy;
            c.radius -= .02;
            if (c.radius < 0)
                circles[j] = new create();
        }
    }
    function create() {
        this.x = W / 2;
        this.y = H / 2;
        this.radius = 2 + Math.random() * 3;
        this.vx = -5 + Math.random() * 10;
        this.vy = -5 + Math.random() * 10;
        this.r = Math.round(Math.random()) * 255;
        this.g = Math.round(Math.random()) * 255;
        this.b = Math.round(Math.random()) * 255;
    }
    for (var i = 0; i < 500; i++) {
        circles.push(new create());
    }
    startBtn.addEventListener('mouseover', function (e) {
        e.preventDefault();
        requestID = requestAnimationFrame(animate);
    });
    startBtn.addEventListener('mouseout', function (e) {
        e.preventDefault();
        cancelAnimationFrame(requestID);
        e.preventDefault();
        posX = 0;
        ctx.clearRect(0, 0, canvas.width, canvas.height);
        ctx.fillRect(posX, 0, boxWidth, canvas.height);
    });
}());
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.min.css'>
<link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css'>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- This script got from frontendfreecode.com -->

<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.min.css'>
<link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css'>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<style>
html, body {
    heigth: 100%;
    width: 100%;
    min-height: 100%;
    position: relative;
    oberflow: hidden;
    color: #fff;
}
body {
    background: #45484d; /* Old browsers */
    background: -moz-radial-gradient(center, ellipse cover, #45484d 0%, #000000 100%); /* FF3.6+ */
    background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#45484d), color-stop(100%,#000000)); /* Chrome,Safari4+ */
    background: -webkit-radial-gradient(center, ellipse cover, #45484d 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
    background: -o-radial-gradient(center, ellipse cover, #45484d 0%,#000000 100%); /* Opera 12+ */
    background: -ms-radial-gradient(center, ellipse cover, #45484d 0%,#000000 100%); /* IE10+ */
    background: radial-gradient(ellipse at center, #45484d 0%,#000000 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', endColorstr='#000000',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
    text-align: center;
}
[class*="BT"] {
    width: 250px;
    display: block;
    position: absolute;
    padding: 0;
    border-color: #0e0e0e;
    margin: 0 0 10px;
    line-height: 6px;
    border-style: solid;
    left: 50%;
    margin-left: -125px;
    height: 60px;
}
[class*="BT"] hover {
    position: absolute;
    z-index: 5;
    width: 246px;
    margin-left: -370px;
    transition: all 0.3s ease-out 0s;
    background: -moz-linear-gradient(45deg, rgba(255,255,255,0) 0%, rgba(135,135,135,0.38) 50%, rgba(255,255,255,0) 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,rgba(255,255,255,0)), color-stop(50%,rgba(135,135,135,0.38)), color-stop(100%,rgba(255,255,255,0))); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(45deg, rgba(255,255,255,0) 0%,rgba(135,135,135,0.38) 50%,rgba(255,255,255,0) 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(45deg, rgba(255,255,255,0) 0%,rgba(135,135,135,0.38) 50%,rgba(255,255,255,0) 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(45deg, rgba(255,255,255,0) 0%,rgba(135,135,135,0.38) 50%,rgba(255,255,255,0) 100%); /* IE10+ */
    background: linear-gradient(45deg, rgba(255,255,255,0) 0%,rgba(135,135,135,0.38) 50%,rgba(255,255,255,0) 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#00ffffff',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
    height: 60px;
    margin-top: -30px;
}
[class*="OH"] {
    overflow: hidden;
}
[class*="BR"] {
    border-width: 2px;
}
[class*="R6"] {
    border-radius: 6px;
}
[class*="NF"] {
    background: transparent;
}
[class*="BT"]:hover hover {
    margin-left: 123px;
}
[class*="TU"] {
    text-transform: uppercase;
}
[class*="PT"] {
    cursor: pointer;
}
[class*="BT"] span {
    position: absolute;
    width: 200px;
    margin-left: -100px;
    z-index: 3;
}
canvas {
    margin: 0;
    padding: 0;
    display: block;
    position: absolute;
    margin-top: -30px;
}
</style>

</head>
<body>
<br /> 
<h3 class="TU">Particle Button & Glow effect</h3>
<br /><br /><br />
<p>
  <button id="button" class="BT-OH-BR-R6-NF-FH-FP-TU-PT">
      <canvas id="canvas"></canvas> 
      <hover></hover>
      <span>Hover for Awesomeness</span>     
  </button>
</p>
<br /><br /><br /><br /><br /><br /><br /><br /><div id="bcl"><a style="font-size:8pt;text-decoration:none;" href="http://www.devanswer.com">Free Frontend</a></div>
<script>
(function () {
    var lastTime = 0;
    var vendors = ['ms', 'moz', 'webkit', 'o'];
    for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
        window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
        window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame']
            || window[vendors[x] + 'CancelRequestAnimationFrame'];
    }
    if (!window.requestAnimationFrame)
        window.requestAnimationFrame = function (callback, element) {
            var currTime = new Date().getTime();
            var timeToCall = Math.max(0, 16 - (currTime - lastTime));
            var id = window.setTimeout(function () { callback(currTime + timeToCall); },
                timeToCall);
            lastTime = currTime + timeToCall;
            return id;
        };
    if (!window.cancelAnimationFrame)
        window.cancelAnimationFrame = function (id) {
            clearTimeout(id);
        };
}());
(function () {
    var startBtn = document.getElementById('button');
    var requestID;
    var canvas = document.getElementById('canvas');
    var ctx = canvas.getContext('2d');
    var posX = 0;
    var W = 246;
    var H = 60;
    var circles = [];
    canvas.width = 246;
    canvas.height = 60;
    function animate() {
        requestID = requestAnimationFrame(animate);
        ctx.fillStyle = "rgba(0,0,0,0.15)";
        ctx.fillRect(0, 0, W, H);
        for (var j = 0; j < circles.length; j++) {
            var c = circles[j];
            ctx.beginPath();
            ctx.arc(c.x, c.y, c.radius, 0, Math.PI * 2, false);
            ctx.fillStyle = "rgba(" + c.r + ", " + c.g + ", " + c.b + ", 0.5)";
            ctx.fill();
            c.x += c.vx;
            c.y += c.vy;
            c.radius -= .02;
            if (c.radius < 0)
                circles[j] = new create();
        }
    }
    function create() {
        this.x = W / 2;
        this.y = H / 2;
        this.radius = 2 + Math.random() * 3;
        this.vx = -5 + Math.random() * 10;
        this.vy = -5 + Math.random() * 10;
        this.r = Math.round(Math.random()) * 255;
        this.g = Math.round(Math.random()) * 255;
        this.b = Math.round(Math.random()) * 255;
    }
    for (var i = 0; i < 500; i++) {
        circles.push(new create());
    }
    startBtn.addEventListener('mouseover', function (e) {
        e.preventDefault();
        requestID = requestAnimationFrame(animate);
    });
    startBtn.addEventListener('mouseout', function (e) {
        e.preventDefault();
        cancelAnimationFrame(requestID);
        e.preventDefault();
        posX = 0;
        ctx.clearRect(0, 0, canvas.width, canvas.height);
        ctx.fillRect(posX, 0, boxWidth, canvas.height);
    });
}());
</script>

</body>
<script>'undefined'=== typeof _trfq || (window._trfq = []);'undefined'=== typeof _trfd && (window._trfd=[]),_trfd.push({'tccl.baseHost':'secureserver.net'},{'ap':'cpbh-mt'},{'server':'p3plmcpnl484880'},{'dcenter':'p3'},{'cp_id':'765442'},{'cp_cl':'8'}) // Monitoring performance to make your website faster. If you want to opt-out, please contact web hosting support.</script><script src='https://img1.wsimg.com/traffic-assets/js/tccl.min.js'></script></html>
Preview