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

CSS से अलर्ट बटन स्टाइल करना


अलर्ट बटन स्टाइल्स

निम्न कोड से CSS के साथ अलर्ट बटन स्टाइल करें:

उदाहरण

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
button { border: none; color: white; font-weight: bolder; padding: 20px; font-size: 18px; cursor: pointer; border-radius: 6px; }
.Success { background-color: #4caf50; } .Success:hover { background-color: #46a049; }
.Info { background-color: #2196f3; } .Info:hover { background: #0b7dda; }
.Warning { background-color: #ff9800; } .Warning:hover { background: #e68a00; }
.Danger { background-color: #f44336; } .Danger:hover { background: #da190b; }
.Default { background-color: #e7e7e7; color: black; } .Default:hover { background: #ddd; }
</style>
</head>
<body>
<h1>Alert Buttons Example</h1>
<button class="Success">Success</button>
<button class="Info">Info</button>
<button class="Warning">Warning</button>
<button class="Danger">Danger</button>
<button class="Default">Default</button>
</body>
</html>

आउटपुट

CSS से अलर्ट बटन स्टाइल करना


  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, Geneva, Verdana, sans-serif; margin: 20px; } span

  1. CSS से स्क्रॉलबार कैसे छिपाएं? CSS से स्क्रॉलबार कैसे छिपाएं?

    CSS से स्क्रॉलबार छिपाने के लिए, कोड निम्नानुसार है -उदाहरण<!DOCTYPE html> <html> <head> <style>    body {       height: 150vh;       width: 200vw;       overflow: hidden;       font-family: "Segoe UI&

  1. CSS से हेडर को स्टाइल कैसे करें? CSS से हेडर को स्टाइल कैसे करें?

    उदाहरण CSS का उपयोग करके हेडर को स्टाइल करने के लिए, निम्न कोड का उपयोग करें: <!DOCTYPE html> <html> <head> <title>पृष्ठ शीर्षक</title> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /&