Ich erstelle ein Login-Formular und möchte nette Buttons haben. Ich habe ein Beispiel für diese Schaltflächen online gesehen. Ist das mit html/css/php möglich?Buttons Formen möglich mit PHP/CSS/HTML?
Antwort
es möglich ist, html/php mit CSS verwenden, einfach diese Zeilen zu Ihrem CSS-Code hinzufügen (Schaltfläche unter der Annahme nicht in einer Abteilung und alle Taste gleiche Aussehen haben)
button{ //your code here }
oder wenn es in einer Abteilung ist können Sie es tun, genau wie dieses
.divclass button{ //your code here}
Sie jedes Styling hinzufügen können es wie Hintergrund-Farbe, Farbe, Schriftart-Stil, e . Tc und man kann so etwas wie
.button button {
background-color: #4CAF50; /* Green */
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
}
.hover button {
background-color: #4CAF50; /* Green */
border: none;
color: white;
padding: 16px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
-webkit-transition-duration: 0.4s; /* Safari */
transition-duration: 0.4s;
cursor: pointer;
}
.button1 {
background-color: white;
color: black;
border: 2px solid #4CAF50;
}
.button1:hover {
background-color: #4CAF50;
color: white;
}
.button2 {
background-color: white;
color: black;
border: 2px solid #008CBA;
}
.button2:hover {
background-color: #008CBA;
color: white;
}
.button3 {
background-color: white;
color: black;
border: 2px solid #f44336;
}
.button3:hover {
background-color: #f44336;
color: white;
}
.button4 {
background-color: white;
color: black;
border: 2px solid #e7e7e7;
}
.button4:hover {background-color: #e7e7e7;}
.button5 {
background-color: white;
color: black;
border: 2px solid #555555;
}
.button5:hover {
background-color: #555555;
color: white;
}
<div class="button"><button>Click Me</button></div><br>Hoverable <br>
<div class="hover">
<button class="button button2">Blue</button>
<button class="button button3">Red</button>
<button class="button button4">Gray</button>
<button class="button button5">Black</button>
</div>
für hoverable Taste tun können Sie
Taste tun: Hover {// Hier Code eingeben}
, die Ihr machen Schaltfläche haben unterschiedliche Ansicht, wenn es schwebte und Sie können ein anderes Beispiel finden here
Für runden Knopf Sie border-radius
in Ihrem Stil hinzufügen können, kann der Wert
<!DOCTYPE html>
<html>
<head>
<style>
.button {
background-color: #4CAF50; /* Green */
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
}
.button1 {border-radius: 2px;}
.button2 {border-radius: 4px;}
.button3 {border-radius: 8px;}
.button4 {border-radius: 12px;}
.button5 {border-radius: 50%;}
</style>
</head>
<body>
<h2>Rounded Buttons</h2>
<p>Add rounded corners to a button with the border-radius property:</p>
<button class="button button1">2px</button>
<button class="button button2">4px</button>
<button class="button button3">8px</button>
<button class="button button4">12px</button>
<button class="button button5">50%</button>
</body>
</html>
ps in px oder% sein: sorry für schlechtes Englisch und ich ein wenig über CSS vergessen, so einfach versuchen Sie, den oben angegebenen Link zu sehen
Ist nicht das OP fragen, wie man Knöpfe mit abgerundeten Kanten style, wie im Screenshot in der Frage gezeigt? – nnnnnn
Sorry das Bild konnte nicht in meinem Browser geladen werden, um abgerundete Schaltfläche Stil das Beispiel ist verfügbar in den Link, den ich [hier] (https://www.w3schools.com/css/css3_buttons.asp) gegeben habe, aber danke ich wird meinen Beitrag bearbeiten –
Ja. Die Kombination, nach der Sie gefragt haben, kann genau das tun, was Sie wollen.
, nachdem ich dein Bild gesehen habe, war ich interessiert, dass die Taste zu machen, ich habe es getan, aber vielleicht ist dies nicht das, was Sie suchen, aber ich glaube, Sie mit ihnen spielen können ..
------ css ----------
body{
height:1000px;
background-color: gray;
}
.buttonContainer{
padding:8px;
max-width: 350px;
background-color:#333333;
color : white;
margin-left : 200px;
}
.button{
background-color:#0066ff;
padding : 8px;
border:none;
color:#fff;
width : 150px;
height : 40px;
margin 8px;
}
.button1{
background-color:#333333;
width:50px;
border-radius:40px;
margin-left:-20px;
margin-right:-10px;
weight:3;
position:absolute;
z-index:4;
}
----------- html -------------- -
<body>
<div class="container">
<div class="buttonContainer"><center>
<button class='button'><b>LOGIN</b></button>
<button class='button button1' disabled>OR</button>
<button class='button'><b>SIGNUP</b></button></center>
</div>
</div>
</body>
body{
height:1000px;
background-color: gray;
}
.buttonContainer{
padding:8px;
max-width: 350px;
background-color:#333333;
color : white;
}
.button{
background-color:#0066ff;
padding : 8px;
border:none;
color:#fff;
width : 150px;
height : 40px;
margin 8px;
}
.button1{
background-color:#333333;
width:50px;
border-radius:40px;
margin-left:-20px;
margin-right:-10px;
weight:3;
position:absolute;
z-index:4;
}
<body>
<div class="container">
\t <div class="buttonContainer"><center>
\t \t <button class='button'><b>LOGIN</b></button>
\t \t <button class='button button1' disabled>OR</button>
\t \t <button class='button'><b>SIGNUP</b></button></center>
\t </div>
</div>
</body>
- 1. Next-Tab und Previous-Tab Buttons in Django-knusprigen Formen
- 2. Anzeige Bootstrap Buttons in verschiedenen Formen und andere Elemente inline
- 3. Wie möglich Xamarin Formen vertikale Balkendiagramme?
- 4. Variable Anzahl von Eingängen mit Django-Formen möglich?
- 5. Wie man jquery Bestätigungsdialog mit mehrfachen Formen zeigt und buttons einreicht mvc
- 6. Beschränken Buttons mit Textbereichen
- 7. Bootstrap 'Buttons mit Dropdown'
- 8. Wie zeichne Formen mit XLSXWriter
- 9. CSS: Hintergrund mit Formen erstellen?
- 10. Scrapy mit dynamischen Inhalten Formen
- 11. Diagonale Formen mit CSS
- 12. cascaded_union Mit Formen kombinieren
- 13. Dynamische Formen mit CSS
- 14. Banner mit gewinkelten Formen
- 15. Radio-Buttons als Submit-Buttons Javascript?
- 16. dynamische alertdialog mit radio buttons
- 17. Sync-Buttons mit Materialise css
- 18. javascript horizontale scroll mit buttons
- 19. Toggle SVG mit Radio Buttons
- 20. löschen sich mit Radio-Buttons
- 21. Kolben Griffform mit Radio-Buttons
- 22. Hide/show buttons mit Javascript
- 23. Buttons mit Wirkung drucken nicht
- 24. Onhashchange mit Browser-Buttons nur
- 25. CSS Header mit Link Buttons
- 26. coderigniter klebrige Formen
- 27. Extjs Grid mit rowbody buttons handler
- 28. jQuery datatables buttons defaults
- 29. iOS Scrubbable Buttons
- 30. Rendering-Formen mit Kolben + wtform
Ja, es ist möglich – user2182349
Ja. Zwei Tasten + CSS. –
Bitte lesen Sie ["Wie stelle ich eine gute Frage?"] (Https://stackoverflow.com/help/how-to-ask) und bearbeiten Sie Ihre Frage entsprechend. –