3D与动画:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title></title>
        <style type="text/css">
            *{
                margin:0;
                padding:0;
            }
            body{
                perspective:1000px;
            }
            ul{
                width:800px;
                height:800px;
                margin:auto;
                position: relative;
                transform-style: preserve-3d;
                animation:name 3s infinite linear;
            }
            ul li{
                position: absolute;
                left: 40%;
                top: 40%;
                width: 200px;
                height: 200px;
                border: 1px solid orange;
                list-style: none;
                text-align: center;
                line-height: 200px;
            }
            ul li:nth-child(1){
                transform: translateZ(100px);
                background: url(img/1.jpg) no-repeat center/100% 100%;
                
            }
            ul li:nth-child(2){
                transform: translateZ(-100px);
                background: url(img/2.jpg) no-repeat center/100% 100%;
                
            }
            ul li:nth-child(3){
                transform: translateX(-100px) rotateY(90deg);
                background: url(img/3.jpg) no-repeat center/100% 100%;
                
            }
            ul li:nth-child(4){
                transform:translateX(100px) rotateY(90deg) ;
                background: url(img/4.jpg) no-repeat center/100% 100%;
                
            }
            ul li:nth-child(5){
                transform: translateY(-100px) rotateX(90deg);
                background: url(img/5.jpg) no-repeat center/100% 100%;
                
            }
            ul li:nth-child(6){
                transform: translateY(100px) rotateX(90deg);
                background: url(img/6.jpg) no-repeat center/100% 100%;
                
            }
            @keyframes name{
                from{
                    transform: rotateY(0);
                }
                to{
                    transform: rotateY(360deg);
                }
            }
        </style>
    </head>
    <body>
        <ul>
            <li>前</li>
            <li>后</li>
            <li>左</li>
            <li>右</li>
            <li>上</li>
            <li>下</li>
            
        </ul>
    </body>
</html>

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<style type="text/css">
			*{
				margin:0;
				padding:0;
			}
			body{
				perspective:1000px;
			}
			ul{
				width:800px;
				height:800px;
				margin:auto;
				position: relative;
				transform-style: preserve-3d;
				animation:name 3s infinite linear;
			}
			ul li{
				position: absolute;
				left: 40%;
				top: 40%;
				width: 200px;
				height: 200px;
				border: 1px solid orange;
				list-style: none;
				text-align: center;
				line-height: 200px;
			}
			ul li:nth-child(1){
				transform: translateZ(100px);
				background: url(img/1.jpg) no-repeat center/100% 100%;
				
			}
			ul li:nth-child(2){
				transform: translateZ(-100px);
				background: url(img/2.jpg) no-repeat center/100% 100%;
				
			}
			ul li:nth-child(3){
				transform: translateX(-100px) rotateY(90deg);
				background: url(img/3.jpg) no-repeat center/100% 100%;
				
			}
			ul li:nth-child(4){
				transform:translateX(100px) rotateY(90deg) ;
				background: url(img/4.jpg) no-repeat center/100% 100%;
				
			}
			ul li:nth-child(5){
				transform: translateY(-100px) rotateX(90deg);
				background: url(img/5.jpg) no-repeat center/100% 100%;
				
			}
			ul li:nth-child(6){
				transform: translateY(100px) rotateX(90deg);
				background: url(img/6.jpg) no-repeat center/100% 100%;
				
			}
			@keyframes name{
				from{
					transform: rotateY(0);
				}
				to{
					transform: rotateY(360deg);
				}
			}
		</style>
	</head>
	<body>
		<ul>
			<li>前</li>
			<li>后</li>
			<li>左</li>
			<li>右</li>
			<li>上</li>
			<li>下</li>
			
		</ul>
	</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值