Ich versuche, eine Flasche Anmeldebildschirm zu machen. Flask benötigt einen type = "submit" Button. Das Verwenden von CSS zum Formatieren der Schaltfläche funktioniert nicht. Derselbe Code mit type = "button" funktioniert, aber flask erkennt die Anfrage nicht. Kann nicht senden Schaltfläche mit CSS senden
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="../static/style2.css" type="text/css">
<title>Login</title>
</head>
<body oncontextmenu="return false">
<div class="body"></div>
<div class="grad"></div>
<div class="header">
<div>XOR-<span>House</span></div>
</div>
<div class="login">
<form action = "/login/" method = "POST">
<p><input type="text" placeholder="Username" name="userid"></p>
<p><input type="password" placeholder="Password" name="ps"></p>
<p><input type ="submit" value ="login" ></p>
</form>
</div>
</body>
</html>
CSS Styling
.login input[type=submit]{
width: 260px;
height: 35px;
background: #fff;
border: 1px solid #fff;
cursor: pointer;
border-radius: 2px;
color: #a18d6c;
font-family: 'Exo', sans-serif;
font-size: 16px;
font-weight: 400;
padding: 6px;
margin-top: 10px;
}
.login input[type=submit]:hover{
opacity: 0.8;
}
.login input[type=submit]:active{
opacity: 0.6;
}
.login input[type=submit]:focus{
outline: none;
}
Eingänge können lustig sein. Haben Sie versucht, dem Element selbst eine Klasse hinzuzufügen? Das mache ich normalerweise. –
add quotes, um es ** Eingabe [type = "submit"] ** –
Stile gelten für die Schaltfläche senden, was ist das genaue Problem –