<h1>Tooltip Example</h1>
<div class="container">
	<div class="tooltipContainer">
		<span class="tooltip" data-tooltip = "Share your Location!" data-tooltip-location = "bottom">
			<i class="fas fa-map-marker-alt"></i>
		</span>
		<!-- Added for Pulsing Circle -->
		<div class="circle" style="animation-delay: 0s"></div>
		<div class="circle" style="animation-delay: 1s"></div>
		<div class="circle" style="animation-delay: 2s"></div>
		<div class="circle" style="animation-delay: 3s"></div>
		<!-- End of Add for Pulsing Circle -->
	</div>
</div>
@import url('https://fonts.googleapis.com/css?family=Lora&display=swap');

body {
	font-family: 'Lora', serif;
	background: #2D3142;
	height: 100vh;
	width: 100vw;
}

h1 {
	background: #F7A072;
	padding: 10px;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	text-align: center;
}

.container {
	display: flex;
	align-items: center;
	justify-content: center;
	height: inherit;
	width: inherit;
}

.tooltipContainer {
	margin: auto;
	background: #BFC0C0;
	border-radius: 5px;
	height: 50vh;
	width: 50vh;
	
	/* To Display the tooltip 'span' in the center of the container */
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Tooltip Styles */
.tooltip {
	color: #FFFFFF;
	font-size: 3rem;
	
	position: relative;
	z-index: 100;
	top: -20px;
}

[data-tooltip-location = "bottom"]:hover::before {
	content: '';
	position: absolute;
	left: 70%;
	top: 50px;

	border-bottom: 15px solid rgba(255,154,66,0.7);
	border-top: 10px solid transparent;
	border-left: 10px solid transparent;
	border-right: 10px solid transparent;
	/*
	opacity: 0;
	transition: opacity 0.3s, transform 0.3s;
	transform-origin: -2em 50%;
	transform: translate3d(0,50%,0) rotate3d(1,1,1,30deg);*/
}
/*
[data-tooltip-location = "bottom"]:hover::before {
	opacity: 1;
	-webkit-transform: translate3d(0,50%,0) rotate3d(0,0,0,0);
	transform: translate3d(0,50%,0) rotate3d(0,0,0,0);
	pointer-events: auto;
}*/

[data-tooltip-location = "bottom"]:hover::after {
	content: attr(data-tooltip);
	font-size: 1rem;
	text-align: center;
	color: #000000;
	padding: 10px;
	
	position: absolute;
	left: -10px;
	top: 75px;
	width: 200px;
	height: 25px;

	background: rgba(255,154,66,0.7);
	border-radius: 5px;
}

/* Animations Extra */
i:hover {
	color: rgba(255,154,66,1);
	animation: jumpInPlace 1s linear infinite;
  	position: absolute;
  	left: -18px;
  	top: -20px;
}

@keyframes jumpInPlace {
  0%, 100% {
    top: -20px;
  }
  50% {
    top: -40px;
  }
}

.circle {
	border-radius: 50%;
	background: rgba(21,22,30,1);
	background: linear-gradient(135deg, rgba(21,22,30,1) 0%, rgba(22,23,31,1) 1%, rgba(115,115,115,1) 100%);
	width: 50px;
	height: 50px;
	position: absolute;
	opacity: 0;
	animation: scaleIn 4s infinite cubic-bezier(.36, .11, .89, .32);
 }

@keyframes scaleIn {
  from {
    transform: scale(.5, .5);
    opacity: .5;
  }
  to {
    transform: scale(2.5, 2.5);
    opacity: 0;
  }
}

External CSS

  1. https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css

External JavaScript

This Pen doesn't use any external JavaScript resources.