Yasmeen Hassan نشر 4 أبريل 2021 أرسل تقرير مشاركة نشر 4 أبريل 2021 ماذا استخدم لجعل رسالة( تم تسجيل الدخول) كأشعار؟ مثل هذا اقتباس رابط هذا التعليق شارك على الشبكات الإجتماعية More sharing options...
1 بلال زيادة نشر 4 أبريل 2021 أرسل تقرير مشاركة نشر 4 أبريل 2021 يمكنك استخدام مكتبة sweet alert من هنا , يمكنك تخصيص أي شكل تريدين أن يظهر في صفحاتك. 1 اقتباس رابط هذا التعليق شارك على الشبكات الإجتماعية More sharing options...
1 Wael Aljamal نشر 4 أبريل 2021 أرسل تقرير مشاركة نشر 4 أبريل 2021 في حال لا تريدين تضمين أي مكتبات يمكن عمل التالي: HTML <div class="alert"> <span class="closebtn" onclick="this.parentElement.style.display='none';">×</span> This is an alert box. </div> CSS /* The alert message box */ .alert { padding: 20px; background-color: #f44336; /* Red */ color: white; margin-bottom: 15px; } /* The close button */ .closebtn { margin-left: 15px; color: white; font-weight: bold; float: right; font-size: 22px; line-height: 20px; cursor: pointer; transition: 0.3s; } /* When moving the mouse over the close button */ .closebtn:hover { color: black; } JS <style> .alert { opacity: 1; transition: opacity 0.6s; /* 600ms to fade out */ } </style> <script> // Get all elements with class="closebtn" var close = document.getElementsByClassName("closebtn"); var i; // Loop through all close buttons for (i = 0; i < close.length; i++) { // When someone clicks on a close button close[i].onclick = function(){ // Get the parent of <span class="closebtn"> (<div class="alert">) var div = this.parentElement; // Set the opacity of div to 0 (transparent) div.style.opacity = "0"; // Hide the div after 600ms (the same amount of milliseconds it takes to fade out) setTimeout(function(){ div.style.display = "none"; }, 600); } } </script> يمكنك تخصيص هذا الإشعار كما تريدين بسهولة بواسطة CSS. 1 اقتباس رابط هذا التعليق شارك على الشبكات الإجتماعية More sharing options...
السؤال
Yasmeen Hassan
ماذا استخدم لجعل رسالة( تم تسجيل الدخول) كأشعار؟
مثل هذا
رابط هذا التعليق
شارك على الشبكات الإجتماعية
2 أجوبة على هذا السؤال
Recommended Posts
انضم إلى النقاش
يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.