Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width">
- <title></title>
- <style id="jsbin-css">
- h1{
- cursor:pointer;
- border-bottom:2px solid red;
- display:inline-block;
- position:absolute;
- left:50%;
- transform:translate(-50%);
- }
- div{
- width:400px;
- display:block;
- margin:200px auto;
- text-align:center;
- }
- span{
- border-radius:10px;
- display:inline-block;
- transform:translate(-5px,-80px);
- opacity:0;
- background-color:red;
- color:white;
- font-size:30px;
- padding:10px 40px;
- }
- h1:hover + span{
- opacity:1;
- transition:all 0.3s linear;
- }
- </style>
- </head>
- <body>
- <div>
- <h1>TOOLTIP</h1>
- <span>Basic Tooltip</span>
- </div>
- <script id="jsbin-source-css" type="text/css">h1{
- cursor:pointer;
- border-bottom:2px solid red;
- display:inline-block;
- position:absolute;
- left:50%;
- transform:translate(-50%);
- }
- div{
- width:400px;
- display:block;
- margin:200px auto;
- text-align:center;
- }
- span{
- border-radius:10px;
- display:inline-block;
- transform:translate(-5px,-80px);
- opacity:0;
- background-color:red;
- color:white;
- font-size:30px;
- padding:10px 40px;
- }
- h1:hover + span{
- opacity:1;
- transition:all 0.3s linear;
- }</script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement