Tooltip

Developer
Size
2,863 Kb
Views
24,288

How do I make an tooltip?

CSS Tooltip. What is a tooltip? How do you make a tooltip? This script and codes were developed by John Heiner on 04 December 2022, Sunday.

Tooltip Previews

Tooltip - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Tooltip</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <i class="has-tooltip">	<span class="tooltip">	Tooltip text	</span>	<a href="#" class="btn">Hover for Tooltip</a>
</i>
</body>
</html>

Tooltip - Script Codes CSS Codes

*, *:before, *:after { box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
body { font-size: 1.2rem; font-family: "Open Sans", sans-serif; color: #444; background-color: #fff; -webkit-font-smoothing: antialiased; margin: 0; padding: 4rem; overflow: hidden; text-align: center;
}
.btn { display: inline-block; padding: 1em 1.6em; border-radius: 999px; border: 2px solid #f28e0a; margin-top: 2rem; color: #f28e0a; font-weight: bold; font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase; text-decoration: none;
}
.has-tooltip { position: relative; font-style: normal;
}
.has-tooltip:hover { cursor: help;
}
.has-tooltip:hover .tooltip { visibility: visible; opacity: 1; -webkit-transform: rotateX(0deg) scale(1); transform: rotateX(0deg) scale(1); pointer-events: auto;
}
.tooltip { text-transform: uppercase; position: absolute; bottom: 120%; width: 160px; padding: .75rem 1rem; border-radius: 6px; text-indent: 0; white-space: normal; text-align: center; color: #fff; display: block; visibility: hidden; pointer-events: none; z-index: 1; opacity: 0; -webkit-transition: all 250ms; transition: all 250ms; -webkit-transform: rotateX(20deg) scale(0.8); transform: rotateX(20deg) scale(0.8); font-size: 0.625rem; background: rgba(0, 0, 0, 0.9); left: 50%; margin: 0 0 5px -80px; -webkit-transform-origin: center 120%; transform-origin: center 120%;
}
.tooltip:after { content: ""; position: absolute; top: 100%; width: 0; border: 7px solid transparent; border-top: 5px solid #333; border-top-color: rgba(0, 0, 0, 0.9); left: 50%; margin-left: -7px;
}
Tooltip - Script Codes
Tooltip - Script Codes
Home Page Home
Developer John Heiner
Username johnheiner
Uploaded December 04, 2022
Rating 3
Size 2,863 Kb
Views 24,288
Do you need developer help for Tooltip?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

John Heiner (johnheiner) Script Codes
Create amazing captions with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!