Quantcast
Channel: CSS floating action button - Stack Overflow
Viewing all articles
Browse latest Browse all 9

Answer by Katrin for CSS floating action button

$
0
0

Here is an example using HTML and CSS to create a floating action button (without the hover effect).

.kc_fab_main_btn {  background-color: #F44336;  width: 60px;  height: 60px;  border-radius: 100%;  background: #F44336;  border: none;  outline: none;  color: #FFF;  font-size: 36px;  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);  transition: .3s;  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.kc_fab_main_btn:focus {  transform: scale(1.1);  transform: rotate(45deg);  -ms-transform: rotate(45deg);  -webkit-transform: rotate(45deg);}
<button class="kc_fab_main_btn">+</button>

DEMO

And here is a simple floating action button jQuery plugin, in case you need it. But it is using on click trigger rather than hover.

KC_FAB


Viewing all articles
Browse latest Browse all 9

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>