Answers for "selected color css button"

CSS
7

elevated button background color

ElevatedButton(
  style: ButtonStyle(
    backgroundColor: MaterialStateProperty.resolveWith<Color>(
      (Set<MaterialState> states) {
        if (states.contains(MaterialState.pressed))
          return Colors.green;
        return null; // Use the component's default.
      },
    ),
  ),
)
Posted by: Guest on March-05-2021
2

css button click color

button{
  background-color:yellow;
}

button:hover{
  background-color:orange;
}

button:focus{
  background-color:red;
}
Posted by: Guest on June-11-2021

Browse Popular Code Answers by Language