উদাহরণ
নিচের কোডটি CSS ব্যবহার করে একটি ভার্টিক্যাল মেনু তৈরি করার উদাহরণ:
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta charset="utf-8"> <style> .Menu { width: 200px; } .links { background-color: rgb(251, 255, 188); color: black; display: block; padding: 12px; text-decoration: none; } .links:hover { background-color: rgb(85, 85, 85); color:white; } .links.selected { background-color: rgb(0, 0, 0); color: white; } </style> </head> <body> <div class="Menu"> <a href="#" class="links selected">About Us</a> <a class="links" href="#">Social Links</a> <a class="links "href="#">Visit Us</a> <a class="links" href="#">More info</a> <a class="links" href="#">Phone Number</a> </div> </body> </html>
আউটপুট
উপরের কোডটি নিচের আউটপুটটি তৈরি করবে:
