0
Beim Schwenken dreht sich die Schaltfläche, zeigt aber keine Perspektive. Es ist wie eine flache orthografische Ansicht der Animation. Verwende ich die perspektivische Eigenschaft falsch?CSS 3D-Transformation erscheint flach (orthografisch?)
@import 'https://necolas.github.io/normalize.css/latest/normalize.css';
/* //////////////////////////////// INITIAL //////////////////////////////// */
html, body{ height:100% } body{ background:#eee }
#btn {
display:block; width:100px; height:100px; margin:0 auto; position:relative;
transform:translateY(-50%); top:50%; background:#333; color:#eee; border:0;
outline:0; text-transform:uppercase
}
/* //////////////////////////////// _PERSP_ //////////////////////////////// */
#btn{ perspective:1000px }
#btn:hover { transform:rotateX(180deg); transform-style:preserve-3d }
/* //////////////////////////////// _TRANS_ //////////////////////////////// */
#btn{ transition-property: transform; transition-duration:1s }
<!doctype html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8"> <meta name="robots" content="noindex, nofollow">
<link rel="stylesheet" href="base.css"> <title>web | animation</title>
</head>
<body>
<button id="btn">button</button>
<!-- ------------------------------ COMMENT ------------------------------- -->
</body>
</html>