Advertisement
1xptolevitico69

CSS Hover effect create clickable link

Jan 1st, 2022
1,651
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.67 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7.     <title>CSS Hover effect create clickable link</title>
  8.     <style>
  9.  
  10. card {
  11.   width: 500px;
  12.   border: 5px solid red;
  13.   display: inline-block;
  14.   text-align: justify;
  15.   padding: 5px 20px;
  16.   box-sizing: border-box;
  17. }
  18. card:hover {
  19.   background-color: red;
  20.   color: white;
  21.   font-family: arial;
  22.   cursor: context-menu;
  23. }
  24. card:hover a {
  25.   display: block;
  26. }
  27. a {
  28.   display: none;
  29.   text-decoration: none;
  30.   position: relative;
  31.   background-color: snow;
  32.   width: 100px;
  33.   text-align: center;
  34.   color: red;
  35.   font-family: arial black;
  36.   padding: 5px 20px;
  37.   margin: 10px 0;
  38. }
  39.  
  40.  
  41.  
  42.  
  43. </style>
  44. </head>
  45. <body>
  46.  
  47. <card>
  48.   <p><a href='https://www.youtube.com/channel/UCqLpDK0eOsG1eEeF9jOUZkw' target='blank'>SUBSCRIBE</a> One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment. His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he looked. "What's happened to me?" he thought. It wasn't a dream. His room, a proper human room although a little too small, lay peacefully between its four familiar walls.</p>
  49. </card>
  50.  
  51.  
  52.  
  53.   <script></script>
  54. </body>
  55. </html>
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement