In CSS, you can do this:
inpu开发者_如何学Ct[type=submit] {
  // properties
}
It's a very useful for styling form buttons.
How do you do the same thing in SASS?
You can also nest it like this
input
  &[type="submit"]
    .... 
  &[type="search"]
    .... 
This converter website says:
input[type=submit]
  // properties
I use the one below in my project.
.bg-brand-3 {
  background-color: black;
  &[type="button"]:enabled {
    &:hover {
      background-color: orange;
    }
    &:active {
      background-color: green;
    }
  }
  &[type="submit"] {
    // css
  }
}
The :enable has the same meaning as :not(:disabled)
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论