A short snippet to detect "background-clip: text" support
A Pen by Václav Vančura on CodePen.
A short snippet to detect "background-clip: text" support
A Pen by Václav Vančura on CodePen.
| <div id="tester">Testing</div> |
| var div = document.createElement('div'); | |
| div.style.webkitBackgroundClip = "text"; | |
| var text = div.style.cssText.indexOf('text'); | |
| document.getElementById('tester').innerHTML = 'Tested: background-clip ' + (text > 0 ? '<span style="color: green">IS</span>' : '<span style="color: red">IS NOT</span>') + ' supported by your browser.'; |
| @import "compass"; | |
| body { | |
| background: black; | |
| color: #eee; | |
| margin: 20px; | |
| } | |
| span { | |
| font-weight: bold; | |
| } |