Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

css html attribut

<div class='dynamic-color' data-assigned-color='red'>lorem ipsum</div>
<div class='dynamic-color' data-assigned-color='blue'>lorem ipsum</div>
<div class='dynamic-color' data-assigned-color='green'>lorem ipsum</div>

.dynamic-color {
    color: [data-assigned-color];
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #css #html #attribut
ADD COMMENT
Topic
Name
8+8 =