[PT-BR] Estava verificando que há algumas fichas que utilizam um Input type=checkbox que, quando clicados, permitem mudar o CSS de campos em lugares diferentes da ficha (ex.: CoC 7ed). Tentei reproduzir a mesma situação, mas não obtive resultados. Há um jeito específico para isso acontecer? Hoje estou utilizando [:checked ~ *] ou [:checked + *] para determinar se o próximo elemento estará ou não com CSS alterado, só que isso só funciona se o elemento está no mesmo nível ou logo em sequência. Mas eu gostaria fazer algo do tipo <div> <input type="checkbox" value="on" name="attr_mostrar_janela" class="mostrar-janela"> </div>
<!-- === --> <div> <div class="janela"> Conteúdo Oculto </div> </div> css .janela{ display: none } input [type=checkbox][name=attr_mostrar_janela][value=on] ~ *.janela { display: block } ou seja, queria criar cada campo ou janela em um nível diferente, mas que os input pudessem comunicar entre si. [translate] I was checking that there are some charsheets that use an Input type = checkbox that, when clicked, allow changing the CSS of fields in different places on the card (ex: CoC 7ed). I tried to reproduce the same situation, but got no results. Is there a specific way for this to happen? I am using [: checked ~ *] or [: checked + *] to determine whether or not the next element will have altered CSS, but this only works if the element is at the same level or right in sequence. But I would like to do something like <div> <input type="checkbox" value="on" name="attr_mostrar_janela" class="mostrar-janela"> </div>
<!-- === --> <div> <div class="janela"> Conteúdo Oculto </div> </div> css: .janela{ display: none } input [type=checkbox][name=attr_mostrar_janela][value=on] ~ *.janela { display: block } that is, I wanted to create each field or window at a different level, but that the inputs could communicate with each other.