Skip to content

Instantly share code, notes, and snippets.

@tkheyfets
Last active March 23, 2016 17:51
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 tkheyfets/891bd6a5a30e2e29e3f3 to your computer and use it in GitHub Desktop.
Save tkheyfets/891bd6a5a30e2e29e3f3 to your computer and use it in GitHub Desktop.
GoogleMaps like Pin with only css and html http://output.jsbin.com/yanowi/1
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width" />
<title>Google Maps like Pin</title>
<link type="text/css" rel="stylesheet" href="pin.css" />
</head>
<body>
<div class="pin">
<div class="info">
Pin
</div>
</div>
</body>
</html>
html * {
box-sizing: border-box;
font-family: 'Helvetica Neue', Helvetica, Georgia, sans-serif;
}
.pin {
width: 64px;
height: 64px;
border-radius: 50% 50% 0;
background-color: skyblue;
-webkit-transform: rotateZ(45deg);
-moz-transform: rotateZ(45deg);
transform: rotateZ(45deg);
cursor: pointer;
position: relative;
-webkit-transition: background-color .25s ease-in;
-moz-transition: background-color .25s ease-in;
transition: background-color .25s ease-in;
}
.pin:hover {
background-color: purple;
color: #787878;
}
.pin:hover .info {
opacity: .5;
}
.pin > * {
transform: rotateZ(-45deg);
}
.info {
border-radius: 75em;
background-color: #fff;
position: absolute;
padding: 14px 0;
width: 48px;
height: 48px;
top: 8px;
left: 8px;
font-weight: 200;
text-align: center;
-webkit-transition: all .25s ease-in;
-moz-transition: all .25s ease-in;
transition: all .25s ease-in;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment