know yourselves. information, computer, 7 wonders, various.

Friday, March 13, 2020

css_part38




 

গ্যালারি তৈরী
এখন ইমেজের Thumbnail তৈরী করে গ্যালারি তৈরী করতে হবে। এজন্য ইমেজের width height নির্ধারন করতে হবে। Link তৈরী করতে হবে। hover ইফেক্ট দিতে হবে এবং caption জুড়ে দিতে হবে। ব্যাস। নিচের প্রোগ্রাম লক্ষ্য করুন।

<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<title> CSS margin and float properties </title>
<style>
div.img{  margin: 2px;  border: 1px solid #0000ff;
  height: auto;  width: auto;  float: left;
  text-align: center;   }
div.img img {display: inline; margin: 3px;
  border: 1px solid #ff0000;}
div.img a:hover img {border: 5px solid #0000ff; }
div.desc{text-align: center;  font-weight: normal;
  width: 120px;  margin: 2px;}
</style>
</head>
<body>
<div class="img">
 <a target="_blank" href="Program_CSS118.html"><img src="Photoshop.jpg"  width="110" height="90"></a>
 <div class="desc">Photoshop Book</div>
</div>
<div class="img">
 <a target="_blank" href="Program_CSS119.html"><img src="Flash.jpg" width="110" height="90"></a>
 <div class="desc">Flash Book</div>
</div>
<div class="img">
 <a target="_blank" href="Program_CSS120.html"><img src="Office.jpg"  width="110" height="90"></a>
 <div class="desc">Office Book</div>
</div>
<div class="img">
 <a target="_blank" href="Program_CSS121.html"><img src="Illustrator.jpg" width="110" height="90"></a>
 <div class="desc">Illustrator Book</div>
</div> </body> </html>
ব্রাউজার দিয়ে খুললে নিচের মত ফলাফল পাওয়া যাবে।

css_part38_image1

ইমেজের অপাসিটি নিয়ন্ত্রন
ইমেজকে ট্রানসপারেন্ট করার জন্য অপাসিটি (Opacity) নির্ধারন করে দিতে হয়। অপাসিটির পরিমান  100%=1 এবং এর কম মান গুলি দশমিক দিয়ে দিতে হয়। যেমন 90% =.9, 80% =.8 এভাবে .৫ .৪ ইত্যাদি , IE8 বা তার আগের ভাসনের জন্য অপাসিটি নির্ধারনের জন্য filter:alpha ব্যবহার করা হয় যেমন filter:alpha (Opacity =x)x এর ভ্যালু হচ্ছে  1-100 পর্যমত্ম। নিচের প্রোগ্রাম লক্ষ্য করুন।

<title> CSS opacity properties </title>
<style>
img{opacity:0.4;filter:alpha(opacity=40);}
img:hover {opacity:1.0;filter:alpha(opacity=100;}
</style>
</head>
<body>
<h1>Image Transparency</h1>
<img src="Photoshop.jpg" width="150" height="200">
<img src="Flash.jpg" width="150" height="200">
</body></html>
ব্রাউজার দিয়ে খুললে নিচের মত ফলাফল পাওয়া যাবে।

css_part38_image2
CSS Image Spites
ইমেজ স্পাইট অর্থ হচ্ছে এক লাইনে একটি ইমেজ রেখে ভিন্ন ইমেজ হিসাবে কাজ করা। এক্ষেত্রে একাধিক ইমেজ ব্যবহার না করার কারনে পেজ দ্রত লোড হবে। এটি অনেকটা ইমেজ স্লাইসিং এর মত অর্থাৎ একটি ইমেজের বিভিন্ন অংশ মার্ক করে Hyperlink তৈরী করা হয়। দেখুন নিচে nav_button.gif নামে একটি ইমেজের অংশ Pixel দিয়ে নির্ধারণ করে Display করা হচ্ছে। কোডিং যেমন :
img. home {width: 45px; height:50px; background:url (nav_buttom.gif) 0 0;}

এখানে লক্ষ্য করুন img.home একটি class, Width height দিয়ে ইমেজের কত pixel নিতে হবে সেটি বলে দেওয়া হয়েছে। background- url এর মধ্যে কোন ইমেজ নিতে হবে সেটি বলা হয়েছে এবং০,০ অর্থ left top থেকে 0px থেকে শুরু করতে হবে। পরবর্তিতে next নামের আরেকটি class নিয়ে -91px থেকে বাম দিকে কত দূরে দ্বিতীয় class শুরু হবে সেটি বলা হয়েছে।

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head><title> CSS image spite </title>
<style>
img.home{width:45px;height:50px;
background:url('nav_button.gif') 0 0;}
img.next{width:45px;height:50px;
background:url('nav_button.gif') -45px 0;}
</style></head>
<body>
<img class="home" src="img_trans.gif" width="1" height="1" />
<br><br>
<img class="next" src="img_trans.gif" width="1" height="1" />
</body>
</html>
</html>
ব্রাউজার দিয়ে খুললে নিচের মত ফলাফল পাওয়া যাবে।

css_part38_image3
Navigation list তৈরী
এখানে আমাদের nav-button-gif ইমেজ ব্যবহার করে একটি Navigation list তৈরী করবো। এখানে আমরা  htmlএর list link ব্যবহার করবো। এটি ব্যবহার করে Horizontal Navigation bar (menu) আমরা আগেই তৈরী করেছি। এখন ইমেজ দিয়ে সেটি বানাবো। নিচের প্রোগ্রাম লক্ষ্য করুন।

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<title> CSS image spite </title>
<style>
.navlist{position:relative;}
.navlist li{margin:0;padding:0;list-style:none;position:absolute;top:0;}
.navlist li,.navlist a{height:50px;display:block;}

.home{left:0px;width:45px;}
.home{background:url('nav_button.gif') 0 0;}

.prev{left:65px;width:45px;}
.prev{background:url('nav_button.gif') -45px 0;}

.next{left:130px;width:45px;}
.next{background:url('nav_button.gif') -90px 0;}
</style>
</head>
<body>
<ul class="navlist">
  <li class="home"><a href=""></a></li>
  <li class="prev"><a href=""></a></li>
  <li class="next"><a href=""></a></li>
</ul>
</body>
</html>
ব্যাখ্যা: লক্ষ্য করুন এখানে .navlist class position:relative ব্যবহার করে absolute পজিশন নির্ধারন করা হয়েছে। দ্বিতীয় লাইনের navlist li তে margin padding oতে সেট করা হয়েছে।    list-style:none করে দেওয়া হয়েছে। top margin-o দেওয়া হয়েছে। navlist থেকে height=50px এবং Block দিয়ে পাশাপাশি বসানোর নির্দেশ দেওয়া হয়েছে। অন্য ক্লাস গুলিতে margin, width ও ইমেজের নাম দেওয়া হয়েছে।

ব্রাউজার দিয়ে খুললে নিচের মত ফলাফল পাওয়া যাবে।

Previous Post                                                                                           Next Post

  বিস্তারিত জানতে নিচের বইটি সংগরহ করে নিন।

Book Name: Mastering Microsoft  Word
Writer: Bappi Ashraf
Published By: Gyankosh Prokashani
Amount of Pages: 464
First Publish: October-2004
Last Edition: We've February-2015 edition. Future edition may be existed!
Book Price: BDT 350 (30% Discount)
 The writer of this book has told that he has written this book with the concept of "teach yourself". On the other hand, Web Design is a thing which is interesting to learn. He has also told that the book is full of fan and enjoyment so that a person can learn Web Design by himself by playing with the example projects of this book.  Book's CD Link below... 

 cd


RELATED POST LINKS BELOW ********************************************
Next_


Part- 02:  Inline Style






css_part37




 
সকল ব্রাউজারে প্রর্দশন উপোযোগী করা
আমরা এর আগে দেখেছি অতিরিক্ত একটি Div (wrapper) তৈরী করে এর মধ্যে মুল <div> টি দেওয়া হয়েছে এতে সকল ব্রাউজারে প্রর্দশন সহজ হবে। এছাড়া <body> ট্যাগের সাথে Margin Padding করে দিলে ব্রাউজারে ডিফল্ট সেটিং নষ্ট হয়ে একটি নিউট্রাল সেটিং তৈরী হবে।

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head><title> CSS margin and float properties </title>
<style>
body{margin:0; padding:0;}
.wrapper {position:relative; width:100%;}
.right {position:absolute; right:0px; width:400px;
background-color:#b0e0e6; }
</style>
</head>
<body>
<div class="wrapper">
<div class="right">
<p>Look! This ia a paragraph with centered align. I am some sample text.Look! This ia a paragraph with centered align. I am some sample text.Look! This ia a paragraph with centered align. I am some sample text.</p>
<p>Look! This ia a paragraph with centered align. I am some sample text.Look! This ia a paragraph with centered align. I am some sample text.Look! This ia a paragraph with centered align. I am some sample text.</p>
</div></div></body></html>
ব্রাউজার দিয়ে খুললে নিচের মত ফলাফল পাওয়া যাবে।



ইমেজ গ্যলারি তৈরী করা
আমরা এখন একটা ইমেজ গ্যালারী তৈরী করবো। আমরা ইতিমধ্যেই float ব্যবহার করে একটি ইমেজ তৈরী করেছি। এই গ্যালারীতে caption থাকবে এবং ইমেজ ক্লিক করলে বড় একটি ইমেজ আসবে । আমরা মোট ৪টি ইমেজ নিয়ে কাজ করবো। ইমেজের Thumbnailএ কিলক করলে যে ইমেজগুলি আসবে সেই ৪টি ফাইল আমরা প্রথমে তৈরী করবো, এখানে অরিজিন্যাল Imageটি আনবো । এখানে Back to Gallery নামে একটি লিংক থাকবে যেটি দিয়ে বার বার গ্যালারিতে ফিরে আসা যাবে। নিচের মত ৬টি প্রোগ্রাম তৈরী করুন।
Program_CSS118
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<title> This is Photoshop book cover</title>
</head>
<body>
<div><h2><a href="Program_CSS118888.html">Back to Galaty</a></h2>
<img border="1" src="Photoshop.jpg"> <br />
Photoshop book</div>
</div>
ব্রাউজার দিয়ে খুললে নিচের মত ফলাফল পাওয়া যাবে।



<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
</head>
<body>
<div><h2><a href="Program_CSS119.html">Back to Galaty</a></h2>
<img border="1" src="Flash.jpg"> <br />
Flash book</div>
</div>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
</head>
<body>
<div><h2><a href="Program_CSS120.html">Back to Galaty</a></h2>
<img border="1" src="Office.jpg"> <br />
Office book</div>
</div>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
</head>
<body>
<div><h2><a href="Program_CSS121.html">Back to Galaty</a></h2>
<img border="1" src="Illustrator.jpg"> <br />
Illustrator book</div>
</div>

Previous Post                                                                                           Next Post

  বিস্তারিত জানতে নিচের বইটি সংগরহ করে নিন।

Book Name: Mastering Microsoft  Word
Writer: Bappi Ashraf
Published By: Gyankosh Prokashani
Amount of Pages: 464
First Publish: October-2004
Last Edition: We've February-2015 edition. Future edition may be existed!
Book Price: BDT 350 (30% Discount)
 The writer of this book has told that he has written this book with the concept of "teach yourself". On the other hand, Web Design is a thing which is interesting to learn. He has also told that the book is full of fan and enjoyment so that a person can learn Web Design by himself by playing with the example projects of this book.  Book's CD Link below... 

 cd


RELATED POST LINKS BELOW ********************************************
Next_


Part- 02:  Inline Style