suit: geht das mit CSS?

Beitrag lesen

Mir wäre nicht bekannt, dass Chrome und Safari damit probleme hätten.

Na dann versuchs doch mal selber:

In der Tat - :hover und der general sibling combinator haben gemeinsam ein Problem - es lässt sich aber fixen, ich hab' schnell was gebaut:

<!DOCTYPE html>  
<html>  
	<head>  
		<title>general sibling</title>  
		<style type="text/css">  
			/*  
				Webkit :hover/general sibling combinator bug  
				http://www.cssplay.co.uk/menus/css3-hover-tilde-problem.html  
			*/  
			html {-webkit-animation: safariSelectorFix infinite 1s;}  
			@-webkit-keyframes safariSelectorFix {  
				0%   { zoom: 1; }  
				100% { zoom: 1; }  
			}  
		  
			#baz {  
				width: 200px;  
				height: 200px;  
				background: blue;  
			}  
			  
			#foo:hover~#baz {  
				background: red;  
			}  
			  
			#bar:hover~#baz {  
				background: green;  
			}  
		</style>  
	</head>  
	<body>  
		<span id="foo">foo</span>  
		<span id="bar">bar</span>  
		<div id="baz"></div>  
	</body>  
</html>