Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-content/pseudo-element-gradient.html - WPT Dashboard Interop Dashboard
<!doctype html>
<meta charset="utf-8">
<title>content: gradient on a pseudo element</title>
<link rel="match" href="pseudo-element-gradient-ref.html">
<style>
#target::before {
content: linear-gradient(purple, yellow);
display: block;
width: 100px;
height: 100px;
}
</style>
<div id="target"></div>