Back to Top
Showing posts with label HtmlCssJs. Show all posts
Showing posts with label HtmlCssJs. Show all posts

How to Reverse String on Webpage :Javascript

Reverse the String

Reverse String  হল সবচেয়ে বেশি জিজ্ঞাসিত javascript  প্রশ্নগুলির মধ্যে একটি। এই ওয়েবপেজের মধ্যে String reverse এর application টি উল্লেখ করা হয়েছে। যার সাহায্যে আপনি কোন একটি String কে textbox এ লিখে reverse button টি চাপেন তাহলে দেখবেন স্ট্রিং টি পুরো উল্টে গেছে। অনেক রকম ভাবে প্রোগ্রামটিকে করা যেতে পারে যেমন-
1. Using Built-in function
2. Recursion
3. Without using built-in function
 join facebook page for more programming



Page Submission Validation

Term and Condition পড়ার পর নিম্নলিখিত checkbox টি click না করলে পরের page এ যাওয়া সম্ভব নয়- website এর effect টি HTML এর সাথে CSS এবং Javascript ব্যবহার করে তৈরি করা হয়- 

I accept the Terms and Conditions

Comment and like to get the source code

Image Changing Effect


image এর উপর মাউস রাখার সাথে সাথে কিভাবে তার পাশে Image টি display হয় তার source code টি নিম্নে উল্লেখ করা হল-

 <========================================================>

<!DOCTYPE html>

<html lang="en">

<head>

  <meta charset="UTF-8">

  <meta http-equiv="X-UA-Compatible" content="IE=edge">

  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <title>Image Change</title>

  <link rel="stylesheet" type="text/css" href="style1.css">

</head>

<body>

  <div class="container">

    <ul class="thumb">

      <li> <a href="ant1.jpg" targer="imgBox"><img src="ant.jpg"/></a></li>

      <li> <a href="apple1.jpg" targer="imgBox"><img src="apple.jpg"/></a></li>

      <li> <a href="arrow1.jpg" targer="imgBox"><img src="arrow.jpg"/></a></li>

      <li> <a href="aunt1.jpg" targer="imgBox"><img src="aunt.png"/></a></li>

    </ul>

    <div class="imgBox"><img src="ant1.jpg"/></div>

  </div>

    <script src="https://code.jquery.com/jquery-3.6.0.js"></script>

 <script type="text/javascript">

$(document).ready(function(){

  $('.thumb a').mouseover(function(e)

  {

    e.preventDefault();

    $('.imgBox img').attr("src",$(this).attr("href"));

  })

})

</script>

</body>

</html>


CSS source Code


body{

    margin: 0;

    padding:0;


}

.container

{

    position:absolute;

    top:50%;

    left:50%;

    transform:translate(-50%,-50%);

}

ul. thumb

{

    margin: 0 auto;

    padding:0;

    float:left;

}

ul.thumb li 

{

  list-style: none;

  margin:5px;

  width:100px;

  height: 100px;

  border:1px solid rgba(134, 74, 74, 0.2);

  overflow:hidden;

}

ul.thumb li img{

    width:100%;

}

.imgBox{

float:left;

width:500px;

height:500px;

border:1px solid rgba(124, 78, 78, 0.2);

overflow:hidden;

}


Navigation Bar using HTML and Internal CSS

Navigation Bar -1

In this post, I have created a Navigation Bar of a website using simple HTML and internal CSS. Source Code are following

Source Code:

<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Website</title>
<style>
.nav{
background-color: black;
}
.item {
list-style-type: none;
display: inline;
}

.items {
background-color: black;
margin: 0;
height: 34px;
padding: 34px ;
width: 50%;
margin-left: auto;
}

a {
margin: 0 10px;
text-decoration: none;
text-transform: capitalize;
letter-spacing: 2px;
font-size: 1.5vw;
color:white;
}

a:hover {
background-color:green;
font-size: 1.5em;
}

a:active {
font-size: 1.5em;
}
</style>
</head>

<body>
<div class="header">
<div class="nav">
<ul class="items">
<li class="item"><a href="">Home</a></li>
<li class="item"><a href="">About Us</a></li>
<li class="item"><a href="">Service</a></li>
<li class="item"><a href="">Gallery</a></li>
<li class="item"><a href="">Contact Us</a></li>
</ul>
</div>
</div>

</body>
</html>

Navigation Bar -2





Another Navigation Bar with the image  using Simple HTML and Internal CSS. Source codes are the following.
 
<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
body {font-family: Arial, Helvetica, sans-serif;}
.navbar {
width: 100%;
background-color: #555;
overflow: auto;
}

.navbar a {
float: left;
padding: 12px;
color: white;
text-decoration: none;
font-size: 17px;
}

.navbar a:hover {
background-color: #000;
}

.active {
background-color: #4CAF50;
}

@media screen and (max-width: 500px) {
.navbar a {
float: none;
display: block;
}
}
</style>
<body>
<div class="navbar">
<a class="active" href="#"><i class="fa fa-fw fa-home"></i> Home</a>
<a href="#"><i class="fa fa-fw fa-search"></i> Search</a>
<a href="#"><i class="fa fa-fw fa-envelope"></i> Contact</a>
<a href="#"><i class="fa fa-fw fa-user"></i> Login</a>
</div>

</body>
</html>