¿Hay alguna forma de heredar el valor del nodo en el atributo content
?atributo 'contenido' para heredar el valor del nodo
Me gusta, si el valor de la etiqueta <h2/>
se establece en "Título aleatorio", ¿puedo obtener este valor dentro del atributo content
en CSS?
He intentado content: inherit;
, pero parece que no funciona.
Un ejemplo de mi teoría:
HTML:
<h2>Random title</h2>
CSS:
h2:after {
content: inherit; /* should be "Random title" */
}
Gracias de antemano!
Si solo quiere reflejar el texto, puede usar algo como 'text-shadow: black 20em 0 0;' –