草庐IT

webkitBackgroundClip

全部标签

javascript - 如何测试浏览器对背景剪辑 : text? 的支持

如何测试background-clip:text的值,webkit支持文本,但是mozilla和其他浏览器不支持我已经尝试过modernizrteststyles但没有成功 最佳答案 vartestEl=document.createElement("x-test");varsupportsWebkitBackgroundClipText=typeoftestEl.style.webkitBackgroundClip!=="undefined"&&(testEl.style.webkitBackgroundClip="text",t