Skip to content

Instantly share code, notes, and snippets.

@AdamHjerpe
Created November 17, 2013 01:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdamHjerpe/7507994 to your computer and use it in GitHub Desktop.
Save AdamHjerpe/7507994 to your computer and use it in GitHub Desktop.
Weird round button that centers on the bottom border of an image. TODO: Convert to mixin and placeholder class
// Markup
// <figure>
// <img src="http://placekitten.com/g/350/244" />
// <a href="#"></a>
// </figure>
figure {
$button-size: 3rem;
position: relative;
a {
position: absolute;
bottom: $button-size / 1.5;
left: 50%;
box-sizing: border-box;
margin-left: -$button-size / 2;
padding: 0;
width: $button-size;
height: $button-size;
border-radius: 100%;
background-image: url(../assets/img/Plus_symbol.svg);
background-position: center center;
background-size: 3.5em;
background-color: $bold-col;
box-shadow: 0 0 0 0.4em fade_out($bold-col, 0.7);
}
<figure>
<img src="http://placekitten.com/g/350/244" />
<a href="#"></a>
</figure>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment