Logo Logo Logo Logo
تست پیش‌فرض

از بوت‌استرپ استفاده کنیدنان تست پیش‌فرضبرای نمایش اعلان‌ها با .تُستکلاس. برای نمایش یک تست، را اضافه کنید.نمایشکلاس و استفاده از جاوا اسکریپت برای حذف خودکار.

<div class="toast show mb-4" role="alert" aria-live="assertive" aria-atomic="true">
    <div class="toast-header">
        <img src="assets/images/logo-dark.png" class="me-auto" height="20" alt="...">
        <small class="text-muted">11 min ago</small>
        <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
    </div>
    <div class="toast-body">
        Hello, world! This is a toast message.
    </div>
</div>
<div class="toast show" role="alert" aria-live="assertive" aria-atomic="true">
    <div class="toast-header">
        <img src="assets/images/logo-dark.png" class="me-auto" height="20" alt="...">
        <small class="text-muted">11 min ago</small>
        <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
    </div>
    <div class="toast-body">
        <h5 class="mb-1 fs-15">Your account will be permanently deleted?</h5>
        <p class="mb-0">Do you intend to continue?</p>
        <div class="mt-3 pt-3 border-top d-flex gap-2">
            <button class="btn btn-dark btn-sm" type="button">I'm not sure</button>
            <button class="btn btn-danger btn-sm" type="button" data-bs-dismiss="toast">Remove My Account</button>
        </div>
    </div>
</div>
مثال زنده

بررسی کنیدمثال زندهاز یک تست بوت‌استرپ با اضافه کردن یک <div class="toast">با.تُستکلاس را به صفحه خود اضافه کنید. از جاوا اسکریپت برای نمایش یا پنهان کردن toast و سفارشی کردن محتوای آن در صورت نیاز استفاده کنید.

<button type="button" class="btn btn-primary" id="liveToastBtn">Show live toast</button>
<div class="toast-container position-fixed bottom-0 end-0 p-3">
    <div id="liveToast" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
        <div class="toast-header">
            <img src="assets/images/logo-dark.png" class="me-auto" height="20" alt="...">
            <small class="text-muted">11 min ago</small>
            <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
        </div>
        <div class="toast-body">
            <h6 class="mb-0">Hello, world! This is a toast message.</h6>
        </div>
    </div>
</div>
طرح‌های رنگی

اعمال کردنطرح‌های رنگیبه Toast های بوت استرپ با استفاده از کلاس هایی مانند .bg-موفقیتیا .bg-خطراین کلاس‌ها رنگ پس‌زمینه‌ی toast را برای مطابقت با تم‌های مختلف، مانند موفقیت یا خطا، تغییر می‌دهند.

<div class="toast show align-items-center text-white text-bg-primary border-0" role="alert" aria-live="assertive" aria-atomic="true">
    <div class="d-flex">
        <div class="toast-body">
            Hello, world! This is the Primary toast message.
        </div>
        <button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
    </div>
</div>
<div class="toast show align-items-center text-white text-bg-secondary border-0 mt-3" role="alert" aria-live="assertive" aria-atomic="true">
    <div class="d-flex">
        <div class="toast-body">
            Hello, world! This is the Secondary toast message.
        </div>
        <button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
    </div>
</div>
<div class="toast show align-items-center text-white text-bg-success border-0 mt-3" role="alert" aria-live="assertive" aria-atomic="true">
    <div class="d-flex">
        <div class="toast-body">
            Hello, world! This is the Success toast message.
        </div>
        <button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
    </div>
</div>
<div class="toast show align-items-center text-white text-bg-info border-0 mt-3" role="alert" aria-live="assertive" aria-atomic="true">
    <div class="d-flex">
        <div class="toast-body">
            Hello, world! This is the Info toast message.
        </div>
        <button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
    </div>
</div>
<div class="toast show align-items-center text-white text-bg-warning border-0 mt-3" role="alert" aria-live="assertive" aria-atomic="true">
    <div class="d-flex">
        <div class="toast-body">
            Hello, world! This is the warning toast message.
        </div>
        <button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
    </div>
</div>
<div class="toast show align-items-center text-white text-bg-danger border-0 mt-3" role="alert" aria-live="assertive" aria-atomic="true">
    <div class="d-flex">
        <div class="toast-body">
            Hello, world! This is the danger toast message.
        </div>
        <button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
    </div>
</div>
<div class="toast show align-items-center text-bg-light border-0 mt-3" role="alert" aria-live="assertive" aria-atomic="true">
    <div class="d-flex">
        <div class="toast-body">
            Hello, world! This is the light toast message.
        </div>
        <button type="button" class="btn-close me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
    </div>
</div>
<div class="toast show align-items-center text-white text-bg-dark border-0 mt-3" role="alert" aria-live="assertive" aria-atomic="true">
    <div class="d-flex">
        <div class="toast-body">
            Hello, world! This is the dark toast message.
        </div>
        <button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
    </div>
</div>
قرار دادن نان تست

تنظیمقرار دادن نان تستدر بوت‌استرپ با استفاده از کلاس‌هایی مانند .top-0 .start-50یا .bottom-0 .end-0این کلاس‌ها toast را در گوشه‌های مختلف صفحه نمایش قرار می‌دهند.

... ۱۱ دقیقه پیش
سلام دنیا! این یک پیام تبریک است.
مثال رنگ نان تست سفارشی

سفارشی سازیرنگ‌های نان تستدر بوت‌استرپ با اعمال کلاس‌هایی مانند.bg-اولیهیا .text-lightبه<div class="toast">این به شما امکان می‌دهد رنگ‌های پس‌زمینه و متن سفارشی را برای toast های خود تنظیم کنید.

سفارشی‌سازی قالب

it's time to style according to your choice ..!

طرح بندی

طرح‌بندی خود را انتخاب کنید

عمودی
افقی
نیمه جعبه
عرض محتوا:
پیش‌فرض
جعبه
جهت چیدمان:
راست‌چین
چپ
حالت چیدمان:
نور
تیره
سیستم
اندازه نوار کناری:
پیش‌فرض
آیکون
رنگ نوار کناری:
نور
تیره