18反转
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>翻转18</title> <style> #test{ width: 400px; height: 400px; position: absolute; margin-left: 100px; margin-top: 100px; perspective: 500px; } #test1{ width: 400px; height: 400px; position: relative; transform-style: preserve-3d; } #div2{ width: 400px; height: 400px; position: relative; background: lightcoral; -webkit-transition: all 1s; } #test #test1:hover #div2{ -webkit-transform: rotateX(180deg); } </style> </head> <body> <div id="test"> <div id="test1"> <div id="div2"></div> </div> </div> </body> </html>
白大褂&小孙