Last active
December 15, 2015 08:39
-
-
Save Mic92/5232331 to your computer and use it in GitHub Desktop.
Zeroclipboard css styling for twitter bootstrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button id="copy" class="btn">Copy</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clip = new ZeroClipboard($("#copy")[0], { | |
moviePath: "/path/to/ZeroClipboard.swf", | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* styling taken from the #btn class */ | |
.zeroclipboard-is-hover { | |
color: rgb(51, 51, 51); | |
background-color: rgb(230, 230, 230); | |
text-decoration: none; | |
background-position: 0px -15px; | |
transition: background-position 0.1s linear 0s; | |
} | |
.zeroclipboard-is-active { | |
color: rgb(51, 51, 51); | |
background-color: rgb(230, 230, 230); | |
background-image: none; | |
outline: 0px none; | |
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15) inset, 0px 1px 2px rgba(0, 0, 0, 0.05); | |
} |
What about setting the bootstrap's classes?
ZeroClipboard.config({
hoverClass: "hover",
activeClass: "active"
});
That's it!
@sanbor No, it doesn't work.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this :)