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, initial-scale=1.0">
- <title>Web Programming</title>
- <link rel="icon" href="https://convertico.com/images/1605706365.5168/download.ico">
- <title>Title of the document</title>
- <style>
- .example {
- position: relative;
- padding: 0;
- width: 300px;
- text-align: center;
- display: block;
- cursor: pointer;
- overflow: hidden;
- }
- .content {
- opacity: 0;
- font-size: 40px;
- position: absolute;
- top: 0;
- left: 0;
- color: #ffffff;
- background-color: rgba(0, 255, 98, 0.5);
- width: 300px;
- height: 300px;
- -webkit-transition: all 400ms ease-out;
- -moz-transition: all 400ms ease-out;
- -o-transition: all 400ms ease-out;
- -ms-transition: all 400ms ease-out;
- transition: all 400ms ease-out;
- text-align: center;
- }
- .example .content:hover {
- opacity: 1;
- }
- .example .content .text {
- height: 0;
- opacity: 1;
- transition-delay: 0s;
- transition-duration: 0.4s;
- }
- .img-container {
- text-align: center;
- }
- </style>
- </head>
- <body>
- <h2>This is Kermit the frog</h2>
- <div class="example">
- <img src="download.jpg" width="300" height="300"/>
- <div class="content">
- <div class="text">I'm Kermit the frog</div>
- </div>
- </div>
- </body>
- </html>
Add Comment
Please, Sign In to add comment