28172 sujets

CSS et mise en forme, CSS3

Bonjour,

J'utilise la propriété
-webkit-transform: rotateY(180deg);
en roll over sur une div. C'est compatible Firefox et IE8 mais pas IE6 et 7. J'ai trouvé un filtre pour la rotation:
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=4);

mais le roll over ne fonctionne pas. Comment faire ?

Voici le code css:

body, div, h1, h2, h3, h4, h5, h6, p, ul, ol, li, dl, dt, dd, img, form, fieldset, blockquote {
	margin: 0; padding: 0; border: 0;
}

body {
	background-color: #3f3f3f;
	font-family: Helvetica, Arial, Sans-Serif;
}
a { font-size:20px; color:#3f3f3f; text-decoration: none;}
a:hover { color:#FFF;}

h1 {
	font-size: 50px; text-transform: uppercase; color: #717171;
	text-shadow: 0 3px 3px #333; margin: 50px 0 0 0; text-align: center;
}
#browser {
	margin: 0 auto; text-align: center;
	text-shadow: 0 3px 3px #333;
}
	#browser em {
		font: italic 26px Georgia, Serif; color: #666; 
	}

#transformers-rule {
	width: 750px; position: relative; margin: 50px auto;
}

.container {
	width: 324px; height: 412px;
	/*-webkit-perspective: 1000;*/
}

.card {
	width: 324px;
	height: 412px;
	border: 5px solid #CFCFCF;
	-webkit-transform-style: preserve-3d;
	-webkit-transition: 0.5s;
}
	.container:hover .card {
		-webkit-transform: rotateY(180deg);
		filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=4);				
	}

.face {
	position: absolute;
	-webkit-backface-visibility: hidden;
}


.megatron {
	float: left; position: absolute; top: 30px; left: 20px;
	-webkit-transform: rotate(5deg);
}
	.megatron .front {
		
	}
	.megatron .back {
		width: 284px; height: 372px; padding: 20px;
		-webkit-transform: rotateY(180deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=4);
		background: #eaeaeb; 
	}
		.megatron .back h2 {
			width: 287px; height: 42px; margin: 0 auto 20px auto;
			background: url(megatron-title.png); text-indent: -9999px; 
		}
		.megatron img {
			float: right;
		}
		.megatron p {
			float: left; width: 300px; margin: 0 0 20px 0;
			font-size: 17px; line-height: 28px; color: #4c4c4c; 
		}
		.megatron dl {
			font-size: 30px; font-weight: bold; 
			line-height: 40px; color: #717171;
			width: 264px; padding: 5px 10px; overflow: hidden; 
			background: #cfcfcf url(gradient.png) repeat-y;
			-webkit-box-shadow: 0 1px 5px #888;
			text-shadow: 0 1px 1px #f5f5f5;
		}
			.megatron dl dt {
				float: left; clear: both;
			}
			.megatron dl dd {
				float: right;
			}

	
.optimus {
	float: left; position: absolute; top: 30px; right: 20px;
	-webkit-transform: rotate(-3deg);
}
	.optimus .front {
		
	}
	.optimus .back {
		width: 284px; height: 372px; padding: 20px;
		-webkit-transform: rotateY(180deg);
		filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=4);
		background: #eaeaeb; 
	}
		.optimus .back h2 {
			width: 292px; height: 33px; margin: 0 auto 20px auto;
			background: url(optimus-title.png); text-indent: -9999px; 
		}
		.optimus img {
			float: right;
		}
		.optimus p {
			float: left; width: 300px; margin: 0 0 27px 0;
			font-size: 17px; line-height: 28px; color: #4c4c4c; 
		}
		.optimus dl {
			font-size: 30px; font-weight: bold; 
			line-height: 40px; color: #717171;
			width: 264px; padding: 5px 10px; overflow: hidden; 
			background: #cfcfcf url(gradient.png) repeat-y;
			-webkit-box-shadow: 0 1px 5px #888;
			text-shadow: 0 1px 1px #f5f5f5;
		}
			.optimus dl dt {
				float: left; clear: both;
			}
			.optimus dl dd {
				float: right;
			}

.front {
	z-index: 10;
}
.container:hover .front {
	z-index: 0;
} 


Code html:


<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Webkit CSS Transformers Top Trumps</title>

<link href="../style-test.css" rel="stylesheet" type="text/css" media="screen" />
</head>

<body>

<h1>logiciels cao 3d architecture</h1>
<p id="browser"><em>De l'avant-projet jusqu'au permis de constuire et à la fabrication</em></p>

<div id="transformers-rule">
	<div class="container megatron">
		<div class="card">
			<div class="face front">
				<img src="megatron.png" alt="Megatron" />
                
			</div>
			<div class="face back">
     <!-- <h2>Megatron</h2>-->
				<img src="logo_envisioneer.png" alt="logo" />

			  <p>Trois versions pour traiter des projets d'architecture et de construction bois.</p>
				
				<dl>
					<dt><a href="envisioneer/envisioneer-essentiel/caracteristiques.html">Caracteristiques</a></dt>
					<dd>></dd>
					
					<dt><a href="envisioneer/envisioneer-essentiel/galerie.html">Galerie</a></dt>
					<dd>></dd>

					
					<dt><a href="envisioneer/envisioneer-essentiel/tarifs.html">Tarifs</a></dt>
					<dd>></dd>
					
					<dt><a href="envisioneer/comparatif.html">Tableau comparatif</a></dt>
					<dd>></dd>

			  </dl>
		  </div>
	 	</div>
	</div>
	
	<div class="container optimus">
		<div class="card">
			<div class="face front">
				<img src="envisioneer-pro.png" alt="envisioneer" />
			</div>

			<div class="face back">
				<!--<h2>Optimus Prime</h2>-->
				<img src="logo_envisioneer.png" alt="logo" />
		    <p>Optimus Prime is the main protagonist and leader of the Autobots.</p>
				
				<dl>
					<dt><a href="envisioneer/envisioneer-professionnel/caracteristiques.html">Caracteristiques</a></dt>
					<dd>></dd>
					
					<dt><a href="envisioneer/envisioneer-professionnel/galerie.html">Galerie</a></dt>
					<dd>></dd>

					
					<dt><a href="envisioneer/envisioneer-professionnel/tarifs.html">Tarifs</a></dt>
					<dd>></dd>
					
					<dt><a href="envisioneer/comparatif.html">Tableau comparatif</a></dt>
					<dd>></dd>

			  </dl>
		  </div>
 	  </div>
	</div>
</div>

</body>
</html>