Home > Enterprise >  copy style from bootstrap 5 button to label
copy style from bootstrap 5 button to label

Time:01-05

For reasons I need my buttons to be <labels > and not regular <button>:

<label for="fileinput" ><i ></i></label><input ...>

But this way the buttons do not get this nice shadow around them when clicking on them. Is there something else I have to add so it inherits the buttons CSS? Or do I have to create a css class and add all those effects by hand?

enter image description here

CodePudding user response:

.btn:focus {box-shadow: 0 0 3px 1px blue; outline: none;}

CodePudding user response:

When you clicked or focused on this button, you have this shadow... you can delete this shadow and outline like this:

.btn:focus {box-shadow: 0 0 3px 1px blue; outline: none;}
  •  Tags:  
  • Related