Button Styles
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 - 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'); }
});
*/
Developer | Christine |
Username | christinegp |
Uploaded | August 09, 2022 |
Rating | 3 |
Size | 3,725 Kb |
Views | 46,552 |
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!
Name | Size |
Read More | 2,328 Kb |
Atlassian template | 5,179 Kb |
Phantom | 74,682 Kb |
LayoutAnimate | 100,170 Kb |
Datatable example | 4,112 Kb |
Eventful | 2,474 Kb |
Multistep form | 3,899 Kb |
Javascript Text Output | 1,413 Kb |
Password Confirmation template | 1,961 Kb |
Itinerary | 7,253 Kb |
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!
Name | Username | Size |
Glitchy Text Effect | Kescoe | 2,208 Kb |
Retina canvas w. resize | Erikterwan | 1,882 Kb |
CSS Chat Bubbles | Boylett | 2,094 Kb |
Countdown Timer | Massiebn | 3,001 Kb |
CSS3 Snow Animation | NickyCDK | 1,695 Kb |
Using Flickr API | MoyArt | 6,761 Kb |
Myprofile | SoufianeAbid | 2,451 Kb |
Scroll effect with text with help from Skrollr | Luxonglassing | 2,935 Kb |
A Pen by Jess | Jessamyne | 5,100 Kb |
BlueBox Fork | Huskynation | 12,675 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!