اردو میں جدید کوڈنگ زبان ایچ ٹی ایم ایل ، سی ایس ایس اور جاوا اسکرپٹ کا یہ تیرواں لیچکچر ہے ۔ یہ لیکچر انتہائی آسان زبان اور آسانی سے سمجھ میں آنے والی کوڈنگ میں لکھا گیا ہے ۔ اس زبان کو ایک نو دس سال کا بچہ بھی آسانی سے سمجھ سکتا ہے ۔۔ تو آئیے شروع کرتے ہیں آج کا تیرواں لیکچر ۔CSS ٹرانزیشنز اور اینیمیشنز ۔ لیکچر 13
ٹرانزیشنز کیا ہیں؟
CSS ٹرانزیشنز آپ کو ایک مخصوص مدت کے دوران پراپرٹی کی قدروں کو ہموار طریقے سے تبدیل کرنے کی اجازت دیتی ہیں۔
<style>
.transition-box {
width: 100px;
height: 100px;
background: red;
transition: width 2s, height 4s;
}
.transition-box:hover {
width: 300px;
height: 300px;
}
</style><div class="transition-box"></div>مکمل کوڈ اس طرح لکھیں
<!DOCTYPE html>
<html lang="EN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content=" your website or article description here....... ">
<title> Your website title here... </title>
<style>
.transition-box {
width: 100px;
height: 100px;
background: red;
transition: width 2s, height 4s;
}
.transition-box:hover {
width: 300px;
height: 300px;
}
</style>
</head>
<body>
<div class="transition-box"></div>
</body>
</html>
اینیمیشنز کیا ہیں؟
CSS اینیمیشنز آپ کو ایک عنصر کو ایک اسٹائل سے دوسرے اسٹائل میں بتدریج تبدیل کرنے کی اجازت دیتی ہیں۔
<style>
.animation-box {
width: 100px;
height: 100px;
background-color: red;
position: relative;
animation-name: example;
animation-duration: 4s;
animation-iteration-count: infinite;
}
@keyframes example {
0% {background-color:red; left:0px; top:0px;}
25% {background-color:yellow; left:200px; top:0px;}
50% {background-color:blue; left:200px; top:200px;}
75% {background-color:green; left:0px; top:200px;}
100% {background-color:red; left:0px; top:0px;}
}
</style> <div class="animation-box"></div>مکمل کوڈ اس طرح لکھیں
<!DOCTYPE html>
<html lang="EN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content=" your website or article description here....... ">
<title> Your website title here... </title>
<style>
.transition-box {
width: 100px;
height: 100px;
background: red;
transition: width 2s, height 4s;
}
.transition-box:hover {
width: 300px;
height: 300px;
}
</style>
</head>
<body>
<div class="animation-box"></div>
</body>
</html>