নিচে মুখোমুখি টুলটিপ তৈরি
নিচের দিকে টুলটিপ দেখানোর জন্য CSS top প্রপার্টি ব্যবহার করা হয়।
উদাহরণ
নিচের কোড চালিয়ে টেক্সটের নিচে টুলটিপ দেখান:
<!DOCTYPE html> <html> <style> .mytooltip .mytext { visibility: hidden; width: 140px; background-color: orange; color: white; z-index: 1; top: 100%; left: 60%; margin-left: -90px; text-align: center; border-radius: 6px; padding: 5px 0; position: absolute; } .mytooltip { position: relative; display: inline-block; margin-top: 50px; } .mytooltip:hover .mytext { visibility: visible; } </style> <body> <div class = "mytooltip">Keep mouse cursor over me <span class = "mytext"> My Tooltip text</span> </div> </body> </html>
মূল পয়েন্ট: .mytooltip কে position: relative এবং টুলটিপ টেক্সটকে position: absolute দিয়ে top: 100% সেট করলে টুলটিপ উপাদানের নিচে দেখাবে।