How can I apply the style below to a type="submit"
at the same time? Without duplicating the entire block?
input[type="button"] {
width: 120px;
margin-left: 35px;
display: block;
}
using a comma( ,
) just like this:
input[type="button"], input[type="submit"] {
width: 120px;
margin-left: 35px;
display: block;
}
check more info here
Use a ,
:
input[type="button"], input[type="submit"] {
width: 120px;
margin-left: 35px;
display: block;
}
You can apply a block of styles to multiple selectors by separating the selectors with commas, as follows:
input[type="button"], input[type="submit"] {
width: 120px;
margin-left: 35px;
display: block;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.