Computer >> कंप्यूटर ट्यूटोरियल >  >> प्रोग्रामिंग >> CSS

सीएसएस के साथ अलर्ट संदेश कैसे बनाएं?


CSS के साथ अलर्ट संदेश बनाने के लिए, कोड इस प्रकार है -

उदाहरण

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
   body{
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
   }
   .alertMessage {
      padding: 20px;
      background-color: #f44336;
      color: white;
      font-size: 20px;
   }
   .close{
      margin-left: 15px;
      color: white;
      font-weight: bold;
      float: right;
      font-size: 22px;
      line-height: 20px;
      cursor: pointer;
      transition: 0.3s;
   }
   .close:hover {
      color: black;
   }
</style>
</head>
<body>
<h1>Alert Message Example</h1>
<div class="alertMessage">
<span class="close" onclick="this.parentElement.style.display='none';">×</span>
<strong>This cannot be revered!</strong> You account will be deleted.
</div>
</body>
</html>

आउटपुट

उपरोक्त कोड निम्न आउटपुट उत्पन्न करेगा -

सीएसएस के साथ अलर्ट संदेश कैसे बनाएं?


  1. CSS के साथ कूपन कैसे बनाएं? CSS के साथ कूपन कैसे बनाएं?

    CSS के साथ एक कूपन बनाने के लिए, कोड इस प्रकार है - उदाहरण <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style>    body {       font-family: "Segoe UI", Tahoma

  1. सीएसएस के साथ कॉलआउट संदेश कैसे बनाएं? सीएसएस के साथ कॉलआउट संदेश कैसे बनाएं?

    CSS के साथ कॉलआउट संदेश बनाने के लिए, कोड इस प्रकार है - उदाहरण <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style>    body {font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sa

  1. सीएसएस के साथ तीर कैसे बनाएं? सीएसएस के साथ तीर कैसे बनाएं?

    सीएसएस के साथ तीर बनाने के लिए, कोड इस प्रकार है - उदाहरण <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style>    body {       font-family: "Segoe UI", Tahoma,