Data Attribute - Combining
How do I make an data attribute - combining?
What is a data attribute - combining? How do you make a data attribute - combining? This script and codes were developed by Dean Leigh on 25 January 2023, Wednesday.
Data Attribute - Combining - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Data Attribute - Combining</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1>Testing CSS with Data Attributes</h1>
<!-- OLD SCHOOL -->
<section class="feature feature--links-internal layout--list xxx"> <div class="feature__title"> <h2 class="feature__title--heading"> <a class="feature__title--link" href="/stuff.htm">Stuff</a> </h2> </div> <div class="feature__content"> <ul> <li class="feature__item"><a class="title" href="/page-1.htm">Page 1</a></li> <li class="feature__item"><a class="title" href="/page-2.htm">This is Page 2</a></li> </ul> </div>
</section>
<!-- NEW SCHOOL -->
<section feature="internal links"> <div feature-title> <h2 feature-title="heading"> <a feature-title="link" href="/stuff.htm">Internal links</a> </h2> </div> <div feature-content> <ul> <li feature-content="short-title"> Just some text in a list item -this will rarely happen </li> <li feature-content="short-title"> <a feature-content="link" class="title" href="/page-1.htm">Page 1</a> </li> <li feature-content="long-title"> <a feature-content="link" href="/page-2.htm">This is Page 2</a> </li> </ul> </div>
</section>
<!-- NEW SCHOOL -->
<section feature="external links" layout="gallery wide special"> <div feature__title> <h2 feature-title="heading"> <a feature-title="link" href="/stuff.htm">External Links</a> </h2> </div> <div feature-content> <ul layout="group"> <li feature-content="item short-title" layout="item"> Just some text in a list item - this will rarely happen </li> <li feature-content="short-title"> <a feature-content="link" class="title" href="/page-1.htm">Page 1</a> </li> <li feature-content="long-title"> <a feature-content="link" href="/page-2.htm">This is Page 2</a> </li> </ul> </div>
</section>
</body>
</html>
Data Attribute - Combining - Script Codes CSS Codes
body { font-face: verdana;
}
h1 { font: 300 1.75rem/1.75rem sans-serif;
}
p, li { font: 300 1.0rem/1.0rem sans-serif;
}
ul, li { margin: 0; padding: 0; list-style: none;
}
[feature] { border: 2px red dotted; margin-bottom: 1rem;
}
[feature-title="heading"] { background: #ccc; color: #333; border-bottom: none; display: block; margin: 0; padding: 0.5rem; border-top-left-radius: 16px; border-top-right-radius: 16px; font: 300 1rem/1.25rem verdana;
}
[feature~="internal"] [feature-title="heading"] { background: #ccf;
}
[feature~="external th lt desc"] [feature-title="heading"] { background: #fcf;
}
[feature~="external th st desc"] [feature-title="heading"] { background: #f00;
}
[feature~="downloads"] [feature-title="heading"] { background: #fcf;
}
[feature-content~="short-title"],
[feature-content~="long-title"] { background: #333; color: #fff; border-bottom: none; display: block; padding: 0.5rem;
}
[feature-content="link"] { color: #f00; background: #fcc; display: block; margin: -0.5rem; padding: 0.5rem;
}
[feature-content="link"]:hover { background: #ff9999; color: #fff;
}
[feature-content="long-title"] [feature-content="link"] { color: #0f0; background: #cfc;
}
[feature-content="long-title"] [feature-content="link"]:hover { background: #99ff99; color: #fff;
}
Developer | Dean Leigh |
Username | deanleigh |
Uploaded | January 25, 2023 |
Rating | 3 |
Size | 2,660 Kb |
Views | 4,048 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
New Menu Bar Data Attribute mark up | 18,798 Kb |
A Pen by Dean Leigh | 1,650 Kb |
BEM Features | 1,356 Kb |
Menu Test - 02 | 2,979 Kb |
Feature - Lists - Simple ul | 2,216 Kb |
Border-image | 1,624 Kb |
Jquery removeClass addClass | 1,657 Kb |
Data Atts - 01 | 2,010 Kb |
CSS Animation playing | 1,729 Kb |
Border test | 0 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Savemedia1.1 | EdsonAlcala | 2,148 Kb |
E-mail Template | SoloMDFK | 4,871 Kb |
Custom checkbox example | Capelo | 3,495 Kb |
Drifting Clouds | Benedikte | 2,247 Kb |
Twitch API | Coderpilot | 3,412 Kb |
DNA Double Helix | Hugo | 5,112 Kb |
Flexbox Grid - equal height | DaveOrDead | 2,855 Kb |
Ionic Infinite outside ion-content with ion-pane | Felquis | 3,117 Kb |
Pictos font library from CodePen | Jstam | 3,790 Kb |
CSS Heart Loaders | Nourabusoud | 2,161 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!