Bootstrap Alerts with Examples in Hindi
Bootstrap Alerts का उपयोग website या web application पर user को किसी information, warning, success message या error के बारे में बताने के लिए किया जाता है। उदाहरण के लिए, जब user कोई form successfully submit करता है तो Success Alert दिखाया जा सकता है और किसी गलत input या problem के लिए Danger Alert का उपयोग किया जा सकता है।
Bootstrap में alerts को तैयार करने के लिए .alert class के साथ अलग-अलग contextual classes का उपयोग किया जाता है। इससे बिना ज्यादा CSS लिखे attractive और responsive notification boxes बनाए जा सकते हैं।
Bootstrap Alert का Basic Syntax
Bootstrap alert बनाने के लिए सबसे पहले .alert class और उसके साथ किसी contextual class का उपयोग किया जाता है।
उदाहरण के लिए:
.alert-primary– Primary information.alert-secondary– Secondary information.alert-success– Success message.alert-danger– Error या danger message.alert-warning– Warning message.alert-info– General information.alert-light– Light alert.alert-dark– Dark alert
Basic Alert Example
नीचे एक basic Bootstrap alert का example दिया गया है:
HTML