| 
									
										
										
										
											2013-12-02 06:23:19 +04:00
										 |  |  | <html> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <style> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .image { | 
					
						
							|  |  |  | 	position: relative; | 
					
						
							|  |  |  | 	display: inline-block; | 
					
						
							|  |  |  | 	vertical-align: middle; | 
					
						
							|  |  |  | 	text-align:left; | 
					
						
							|  |  |  | 	width: 300px; | 
					
						
							|  |  |  | 	height: 300px; | 
					
						
							|  |  |  | 	font-size: 12pt; | 
					
						
							|  |  |  | 	overflow: hidden; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	box-sizing: border-box; | 
					
						
							|  |  |  | 	color: white; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	text-shadow: black 0.1em 0.1em 0.4em, black 0.1em 0.1em; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	background: no-repeat 50% black; | 
					
						
							|  |  |  | 	background-size: contain; | 
					
						
							|  |  |  | 	/* XXX do we need this? */ | 
					
						
							|  |  |  | 	border: solid black 5px; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/*-webkit-filter: invert(1);*/ | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | .current.image { | 
					
						
							|  |  |  | 	background: no-repeat 50% black; | 
					
						
							|  |  |  | 	background-size: contain; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/* XXX remove this... */ | 
					
						
							|  |  |  | 	border: solid red 5px; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-12-02 08:50:43 +04:00
										 |  |  | .ribbon { | 
					
						
							|  |  |  | 	position: relative; | 
					
						
							|  |  |  | 	display: block; | 
					
						
							|  |  |  | 	height: auto; | 
					
						
							|  |  |  | 	min-width: 0px; | 
					
						
							|  |  |  | 	overflow: visible; | 
					
						
							|  |  |  | 	white-space: nowrap; | 
					
						
							|  |  |  | 	font-size: 0; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	margin-top: 20px; | 
					
						
							|  |  |  | 	margin-bottom: 20px; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | .ribbon:empty { | 
					
						
							|  |  |  | 	display: none; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | .ribbon:first-child { | 
					
						
							|  |  |  | 	margin-top: 0px; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | .ribbon:last-child { | 
					
						
							|  |  |  | 	margin-bottom: 0px; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-12-02 06:23:19 +04:00
										 |  |  | /*********************************************************************/ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .image2:before, | 
					
						
							|  |  |  | .image2 { | 
					
						
							|  |  |  | 	position: relative; | 
					
						
							|  |  |  | 	display: inline-block; | 
					
						
							|  |  |  | 	vertical-align: middle; | 
					
						
							|  |  |  | 	text-align:left; | 
					
						
							|  |  |  | 	font-size: 12pt; | 
					
						
							|  |  |  | 	overflow: visible; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	color: white; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | .image2 { | 
					
						
							|  |  |  | 	width: 290px; | 
					
						
							|  |  |  | 	height: 290px; | 
					
						
							|  |  |  | 	background: no-repeat 50% transparent; | 
					
						
							|  |  |  | 	background-size: contain; | 
					
						
							|  |  |  | 	margin: 5px; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	-webkit-filter: invert(1); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .ribbon { | 
					
						
							|  |  |  | 	display: inline-block; | 
					
						
							|  |  |  | 	background: black; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .current.image2:before { | 
					
						
							|  |  |  | 	position: relative; | 
					
						
							|  |  |  | 	content: ""; | 
					
						
							|  |  |  | 	top: -5px; | 
					
						
							|  |  |  | 	left: -5px; | 
					
						
							|  |  |  | 	width: 100%; | 
					
						
							|  |  |  | 	height: 100%; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/* XXX this is affected by the filter... */ | 
					
						
							|  |  |  | 	border: solid 5px red; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /*********************************************************************/ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | </style> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <body> | 
					
						
							| 
									
										
										
										
											2013-12-02 08:50:43 +04:00
										 |  |  | 	The current structure... | 
					
						
							|  |  |  | 	<div> | 
					
						
							|  |  |  | 		<div class="image" style="background-image: url(image.jpg)"></div> | 
					
						
							|  |  |  | 		<div class="current image" style="background-image: url(image.jpg)"></div> | 
					
						
							|  |  |  | 	</div> | 
					
						
							| 
									
										
										
										
											2013-12-02 06:23:19 +04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	<hr> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-12-02 08:50:43 +04:00
										 |  |  | 	Image bg transparent while the ribbon's bg is black...<br> | 
					
						
							| 
									
										
										
										
											2013-12-02 06:23:19 +04:00
										 |  |  | 	<div class="ribbon"> | 
					
						
							|  |  |  | 		<div class="image2" style="background-image: url(image.jpg)"></div> | 
					
						
							|  |  |  | 		<div class="current image2" style="background-image: url(image.jpg)"></div> | 
					
						
							|  |  |  | 	</div> | 
					
						
							|  |  |  | </body> | 
					
						
							|  |  |  | </html> |