HTML + CSS I would like to put a radio button as a symbol

3

Hello, guys.

I want to put the Δ symbol as a radio button, and when I click it, it flips over that other ▲ symbol. How do I do this?

    
asked by anonymous 14.01.2017 / 21:55

1 answer

2

You can use only html + css to do this, very easily using the 'for' attribute, I created a basic example using a class inside the input radio, see:

.personalizado{
  display:none;
}
.personalizado+label:before{
  content:'Δ';
}
.personalizado:checked+label:before{
  content:'▲';
}

HTML

<input type="radio" id="inputradio" class="personalizado" name="name" value="value">
<label for="inputradio">Something</label>

link

    
14.01.2017 / 22:45