Skip to content

Instantly share code, notes, and snippets.

@Mic92
Last active December 15, 2015 08:39
Show Gist options
  • Save Mic92/5232331 to your computer and use it in GitHub Desktop.
Save Mic92/5232331 to your computer and use it in GitHub Desktop.
Zeroclipboard css styling for twitter bootstrap
<button id="copy" class="btn">Copy</button>
clip = new ZeroClipboard($("#copy")[0], {
moviePath: "/path/to/ZeroClipboard.swf",
);
/* 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);
}
@gbedardsice
Copy link

Thanks for this :)

@sanbor
Copy link

sanbor commented Jun 19, 2014

What about setting the bootstrap's classes?

ZeroClipboard.config({
hoverClass: "hover",
activeClass: "active"
});

That's it!

@tbodt
Copy link

tbodt commented Nov 25, 2014

@sanbor No, it doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment