CSS - 设置输入样式时按钮的设置样式如何?

Luc*_*cas 2 css

我的html代码中有这两个:

<input class="input1" type="text" size="15" name="login">
<input class="input1" type="submit" value="Send">
Run Code Online (Sandbox Code Playgroud)

在CSS我有风格.input1和input.input1:

.input1 {
//something
}
input.input1 {
//something
}
Run Code Online (Sandbox Code Playgroud)

现在我想只为按钮更改样式(类型提交)并保留输入类型文本的样式.我怎样才能做到这一点?我试图用CSS submit.input1 {和button.input1 {,但是这是行不通的.

Geo*_*rge 5

尝试

input[type=submit] { /* your code here*/ }
Run Code Online (Sandbox Code Playgroud)

要么

input.inputbox[type=submit] { /* your code here*/ }
Run Code Online (Sandbox Code Playgroud)