Advertisement
1xptolevitico69

How to Style a Link

May 27th, 2020
1,117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.78 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>How to Style a Link</title>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width">
  7. <style>
  8.  
  9.  
  10. a {
  11. position:absolute;
  12. top:50%;
  13. left:50%;
  14. transform:translate(-50%,-50%);
  15. text-decoration:none;
  16. border:5px solid;
  17. width:160px;
  18. height:160px;  
  19. display: flex;
  20. justify-content: center;
  21. align-items: center;
  22. font-family:arial black;
  23. font-size:25px;
  24. background-color:red;
  25. color:white;
  26. border-radius:10px;
  27. box-shadow:5px 5px 4px black;
  28. }
  29.  
  30.  
  31.  
  32. </style>
  33. </head>
  34. <body>
  35.  
  36.  
  37. <a id='bt' onmouseup='up()' onmousedown='down()' href='' >C/DRIVE</a>
  38.  
  39.  
  40. <script>
  41.  
  42.  
  43. function down(){
  44. bt.style.boxShadow="1px 1px 1px black";
  45. }
  46.  
  47. function up(){
  48. bt.style.boxShadow="5px 5px 4px black";
  49. }
  50.  
  51.  
  52.  
  53. </script>
  54. </body>
  55. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement