开发者

Detecting Effective Invisible HTML elements

开发者 https://www.devze.com 2023-01-12 13:59 出处:网络
Is there a way to detect if a rendered DOM element has the same color as its background, effectively being invi开发者_StackOverflow社区sible invisible elements (that is: elements invisible not because

Is there a way to detect if a rendered DOM element has the same color as its background, effectively being invi开发者_StackOverflow社区sible invisible elements (that is: elements invisible not because of display style property, but based on color only), possibly through a framework/tool that works at least on one browser? Ideally, it would be able to detect very similar colors as well. Background images would be great to be considered, but then this might be a little too far.


I've used this in the past - very helpful. Basically it checks the contrast between foreground and background to see if the site is accessible. It will definitely flag up elements that are, as you say, invisible

http://juicystudio.com/article/colour-contrast-analyser-firefox-extension.php

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号