Button Styles

Developer
Size
3,725 Kb
Views
46,552

How do I make an button styles?

Lifted from - http://uxeast.org - http://shoptalkshow.com/episodes/134-marc-grabanski/#t=16:07. What is a button styles? How do you make a button styles? This script and codes were developed by Christine on 09 August 2022, Tuesday.

Button Styles Previews

Button Styles - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Button Styles</title> <script src="http://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel='stylesheet prefetch' href='http://fonts.googleapis.com/css?family=Lato:300'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <!-- http://uxeast.org -->
<a class="btn" data-js="btn"> <span class="btn-inr"> <span class="txt-a">See this button?</span> <span class="txt-b">Now ya do.</span> </span>
</a> <script src='http://www.quasimondo.com/StackBlurForCanvas/StackBlur.js'></script> <script src="js/index.js"></script>
</body>
</html>

Button Styles - Script Codes CSS Codes

.btn { position: relative; top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%);
}
*,
*::before,
*::after { box-sizing: border-box;
}
html,
body { width: 100%; height: 100%;
}
body { position: relative; font-family: "Lato", "Avant Garde", Avantgarde, "Century Gothic", CenturyGothic, "AppleGothic", sans-serif; font-weight: 300; text-align: center; overflow: hidden; background: url(http://magdeleine.co/wp-content/uploads/2015/01/tongariro-national-park-493289-1400x933.jpg) no-repeat center center; background-size: cover;
}
body:after { content: ""; position: absolute; top: 0; left: 0; display: block; width: 100%; height: 100%; background: -webkit-linear-gradient(315deg, #2980b9 0%, #9B59B6 100%); background: linear-gradient(135deg, #2980b9 0%, #9B59B6 100%); background-size: 100% auto; opacity: 0; -webkit-transition: all .65s ease-in-out; transition: all .65s ease-in-out;
}
.blur:after { opacity: .85;
}
.btn { position: relative; display: inline-block; border: 6px solid #ed7669; -webkit-transition: all .1s ease-in-out; transition: all .1s ease-in-out; z-index: 99;
}
.btn.active { box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
}
.btn:focus, .btn:hover { border: 12px solid #e74c3c;
}
.btn,
.btn > span { cursor: pointer;
}
.btn > span { min-width: 426px;
}
.btn-inr { display: inline-block; color: white; font-weight: 100; font-size: 2em; line-height: 1; text-transform: uppercase; background: #ed7669; padding: 1em 2em; margin: 6px; -webkit-transition: all .1s ease-in-out; transition: all .1s ease-in-out;
}
.btn-inr:focus, .btn-inr:hover { background: #e74c3c; padding: 1em 2em; margin: 0;
}
.txt-a { display: inline;
}
.txt-b { display: none;
}
.btn:focus .btn-inr,
.btn:hover .btn-inr { background: #e74c3c; padding: 1em 2em; margin: 0;
}
.btn:focus .txt-a,
.btn:hover .txt-a { display: none;
}
.btn:focus .txt-b,
.btn:hover .txt-b { display: inline;
}

Button Styles - Script Codes JS Codes

// http://shoptalkshow.com/episodes/134-marc-grabanski/#t=16:07
// vanilla JS
function toggleButton(el) { var body = document.body; var element = document.querySelector(el); element.addEventListener('mouseenter', function(e) {	e.target.classList.add('active'); body.classList.add('blur'); }, false); element.addEventListener('mouseleave', function(e) { e.target.classList.remove('active'); body.classList.remove('blur'); }, false);
};
toggleButton('[data-js="btn"]');
// jQuery
/*
$('[data-js="btn"]').hover(function(){ $(this).toggleClass('active'); if ($(this).hasClass('active')) { $('body').addClass('blur'); } else { $('body').removeClass('blur'); }
});
*/
Button Styles - Script Codes
Button Styles - Script Codes
Home Page Home
Developer Christine
Username christinegp
Uploaded August 09, 2022
Rating 3
Size 3,725 Kb
Views 46,552
Do you need developer help for Button Styles?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Christine (christinegp) Script Codes
Create amazing SEO content with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!