ظهور باکس راهنما
بازگشت به صفحه اصلی
بازگشت به صفحه مقاله
دو ستونی
دو سطری
اجرای کد RUN »
<!DOCTYPE html> <html> <style> .tooltip { position: relative; display: inline-block; border-bottom: 1px dotted black; } .tooltip .tooltiptext { visibility: hidden; width: 120px; background-color: black; color: #fff; text-align: center; border-radius: 6px; padding: 5px 0; position: absolute; z-index: 1; bottom: 100%; left: 50%; margin-left: -60px; /* باکس ظاهر شونده -برای رسیدن از شفافیت 0% به 100% یک ثانیه طول میکشد: */ opacity: 0; transition: opacity 1s; } .tooltip:hover .tooltiptext { visibility: visible; opacity: 1; } h2,div {direction:rtl;} </style> <body style="text-align:center;"> <h2>باکس راهنمای ظاهر شونده</h2> <p>وقتی با ماوس بر روی متن زیر اشاره کنید باکس راهنما شروع به ظاهر شدن می کند و تا نمایش کامل فقط یک ثانیه طول می کشد. </p> <div class="tooltip">روی من اشاره کن! <span class="tooltiptext">متن راهنما</span> </div> </body> </html>