b0rn-to-be-wild

Tutorial: POP-UP BOXES (v.1) CSS

Mar 3rd, 2018
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. Paste the following code under <style type="text/css">:
  2.  
  3. /*----- POP UP BOX by borntobewildcodes -----*/
  4.  
  5. /* You can change the placement of this box and set position value to fixed */
  6.  
  7. #popup_button{
  8. position:fixed;
  9. margin-top:50px;
  10. margin-left:50px;
  11. width:30px;
  12. height:30px;
  13. padding:5px;
  14. background:#fff;
  15. border:1px solid #eee;
  16. border-radius:2px;
  17. text-align:center;
  18. line-height:30px;
  19. overflow:hidden;
  20. z-index:10000;
  21. -webkit-transition: all 0.7s ease;
  22. -moz-transition: all 0.7s ease;
  23. -o-transition: all 0.7s ease;
  24. }
  25.  
  26. #popup_button span{
  27. font-size:12px;
  28. color:#444;
  29. }
  30.  
  31. #popup_button:hover span{
  32. color:#000;
  33. }
  34.  
  35. #open{
  36. position:absolute;
  37. width:30px;
  38. height:30px;
  39. }
  40.  
  41. #close{
  42. position:absolute;
  43. width:30px;
  44. height:30px;
  45. z-index:10;
  46. display:none;
  47. }
  48.  
  49. /* Pop-up box */
  50.  
  51. #popup_box{
  52. position:fixed;
  53. top:50px;
  54. left:100px;
  55. padding:30px 40px;
  56. width:520px;
  57. height:auto;
  58. background:#ffffff;
  59. border:1px solid #eee;
  60. z-index:10000;
  61. overflow:hidden;
  62. display:none;
  63. color:#222222;
  64. font-size:15px;
  65. line-height:25px;
  66. text-align:justify;
  67. -webkit-transition: all 0.7s ease;
  68. -moz-transition: all 0.7s ease;
  69. -o-transition: all 0.7s ease;
  70. }
Add Comment
Please, Sign In to add comment