Works but need to next inputs inside labels if want no text
This commit is contained in:
parent
51f2656ad9
commit
e9d104f078
18
index.html
18
index.html
@ -77,18 +77,12 @@
|
|||||||
</p> -->
|
</p> -->
|
||||||
<p class="damage">
|
<p class="damage">
|
||||||
<span>
|
<span>
|
||||||
<!-- <label>
|
<input type="radio" name="d1" id="clear" checked>
|
||||||
</label>
|
<label for="clear">lethal</label>
|
||||||
<label>
|
<input type="radio" name="d1" id="bruise">
|
||||||
</label>
|
<label for="bruise">clear</label>
|
||||||
<label>
|
<input type="radio" name="d1" id="lethal">
|
||||||
</label> -->
|
<label for="lethal">bruise</label>
|
||||||
<input type="radio" name="d1">
|
|
||||||
<!-- <label>label1</label> -->
|
|
||||||
<input type="radio" name="d1">
|
|
||||||
<!-- <label>label2</label> -->
|
|
||||||
<input type="radio" name="d1" checked>
|
|
||||||
<!-- <label>label3</label> -->
|
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p><span>Troop Number</span> 1</p>
|
<p><span>Troop Number</span> 1</p>
|
||||||
|
34
style.css
34
style.css
@ -95,24 +95,54 @@ input {
|
|||||||
outline: 2px solid deeppink;
|
outline: 2px solid deeppink;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input + label {
|
||||||
|
border: 1px solid red;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
input:first-of-type {
|
input:first-of-type {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
label:first-of-type {
|
||||||
|
border: none;
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
input:checked {
|
input:checked {
|
||||||
border: none;
|
border: none;
|
||||||
outline: 2px solid deeppink;
|
outline: 2px solid deeppink;
|
||||||
}
|
}
|
||||||
|
|
||||||
input:has(+ input:checked) {
|
input:checked + label {
|
||||||
|
border: 1px solid red;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
input:has(+ label + input:checked) {
|
||||||
border: none;
|
border: none;
|
||||||
outline: 2px solid deeppink;
|
outline: 2px solid deeppink;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="radio"]:checked + input {
|
label:has(+ input:checked) {
|
||||||
|
border: 1px solid red;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="radio"]:checked + label + input {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input:checked + label + input + label {
|
||||||
|
border: none;
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
position: absolute;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
image#img1 {
|
image#img1 {
|
||||||
transform: scale(3.41) rotate(-0.15deg);
|
transform: scale(3.41) rotate(-0.15deg);
|
||||||
/* opacity: 0.33; */
|
/* opacity: 0.33; */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user