CSS3 के संक्रमण प्रभाव बनाने के लिए, संक्रमण संपत्ति का उपयोग करें। CSS3 का उपयोग करके संक्रमण प्रभाव बनाने के लिए कोड निम्नलिखित है -
उदाहरण
<!DOCTYPE html>
<html>
<head>
<style>
.container div {
width: 300px;
height: 100px;
background: rgb(25, 0, 255);
border: 2px solid red;
transition: width 2s;
}
.container:hover div {
width: 100px;
}
</style>
</head>
<body>
<h1>Transition effects example</h1>
<div class="container">
<div></div>
</div>
<h2>Hover over the above div to reduce its width</h2>
</body>
</html> आउटपुट
उपरोक्त कोड निम्न आउटपुट उत्पन्न करेगा -

डिव के ऊपर मँडराने पर -
