Existe um seletor CSS que se aplica a atributos não vazios ? Usar :not([Data-Attribute=''])correspondências se o atributo também não existir .
Estou procurando algo como [Data-Attribute!=''].
Existe um seletor CSS que se aplica a atributos não vazios ? Usar :not([Data-Attribute=''])correspondências se o atributo também não existir .
Estou procurando algo como [Data-Attribute!=''].
Respostas:
tente isso
<style>
[Data-Attribute]:not([Data-Attribute=""])
{
background-color: Red;
}
</style>
title).
[Data-Attribute!='']se você estivesse falando sobre o seletor jQuery, porque o seletor jQuery é equivalente:not([Data-Attribute=''])e corresponde se o atributo não for especificado.