Advertisement
shababshihan

প্যারালাক্স স্ক্রল প্লাগিন এর বাবহার

May 12th, 2015
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.91 KB | None | 0 0
  1. প্যারালাক্স স্ক্রল প্লাগিন এর বাবহারঃ
  2. -------------------------
  3. ধাপ-১ # প্রথমে index.html এর body এর ঠিক উপরে প্যারালাক্স স্ক্রল প্লাগিন লিঙ্ক করতে হবে ।
  4. ধাপ-২ # যে div গুলো কে প্যারালাক্স স্ক্রল করবো , সেগুলো div এ প্যারালাক্স স্ক্রল কমান্ড ব্যবহার করি ।
  5. ধাপ-৩ # style.css এ নিজের ইচ্ছা মত style করি ।
  6. ধাপ-৪ # main.js এ jQuery কমান্ড ব্যবহার করি ।
  7.  
  8. উদাহরণঃ
  9. index.html কোড:
  10. ----------------
  11. <!DOCTYPE HTML>
  12. <html lang="en-US">
  13. <head>
  14. <meta charset="UTF-8">
  15. <title>parallax scroll</title>
  16. <link rel="stylesheet" type="text/css" href="style.css" media="all" />
  17. </head>
  18. <body>
  19. <div class="header_area fix">
  20. <h1>this is heading</h1>
  21. <div class="header_one fix" data-parallax="scroll" data-image-src="images/gallery1.jpg">
  22. <h1>parallax one</h1>
  23. <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
  24. </div>
  25. <div class="header_two fix" data-parallax="scroll" data-image-src="images/gallery2.jpg">
  26. <h1>parallax one</h1>
  27. <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
  28. </div>
  29. <div class="header_three fix" data-parallax="scroll" data-image-src="images/gallery3.jpg">
  30.  
  31. </div>
  32. <div class="header_four fix" data-parallax="scroll" data-image-src="images/gallery4.jpg">
  33.  
  34. </div>
  35. <div class="header_five fix" data-parallax="scroll" data-image-src="images/gallery5.jpg">
  36.  
  37. </div>
  38. </div>
  39. <script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
  40. <script type="text/javascript" src="js/parallax.min.js"></script>
  41. <script type="text/javascript" src="js/main.js"></script>
  42. </body>
  43. </html>
  44. ----------------------------------------------------------------------------------------------------------------------
  45. style.css
  46. ------------
  47. body{margin:0;padding:0;font-size:16px;line-height:20px;font-family:arial;position: relative;}
  48. img{max-width:100%;}
  49. .fix:after{content:'';display:table;clear:both;}
  50. .header_area{}
  51. .header_one,.header_two,.header_three,.header_four,.header_five{
  52. min-height: 800px;
  53. background: transparent;
  54. color:#fff;
  55. text-align:center;
  56. background-position:center center;
  57.  
  58. }
  59. h1{
  60. margin-top:15px;
  61. }
  62. p{
  63. max-width:350px;
  64. margin:0 auto;
  65. }
  66.  
  67. ---------------------------------------------------------------------------------------------------------------------------------
  68. jQuery কমান্ডঃ
  69. ------------
  70. // Parallax Background js
  71. $(document).ready(function(){
  72. $('.parallax1').parallax();
  73. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement