aminhashemy
چهارشنبه 28 مرداد 1394, 14:55 عصر
خسته نباشید دوستان
من میخوام یه مکعب سه بعدی با CSS بسازم ولی بیشتر شبیه این مانیتور های CRT میشه تا مکعب
این لینک رو ببینید : http://s.7learn.com/uploads/2014/09/cube2.html
میخوام این شکلی بشه ولی نمیشه نمیفهمم هم چرا
اگه امکانش هست بگید مشکلش توی چیه؟
این کدهای من
<html>
<head>
<link type="text/css" href="cube.css" rel="stylesheet" />
</head>
<body>
<div class="cube-container">
<div id="cube" class="cube">
<div class="front">front</div>
<div class="back">back</div>
<div class="left">left</div>
<div class="right">right</div>
<div class="top">top</div>
<div class="bottom">bottom</div>
</div>
</div>
</body>
</html>
اینا هم CSS هاش:
.cube{
perspective: 800px;
width: 200px;
height: 200px;
margin: 50px auto;
position: relative;
transform-style: preserve-3d;
perspective-origin:50% 50%;
animation:rotate 3s linear infinite;
}
@keyframes rotate {
from{transform:rotateY(0deg);}
to{transform:rotateY(360deg);}
}
.cube > div{
border:1px solid black;
position: absolute;
text-align: center;
line-height: 200px;
width: 200px;
height: 200px;
}
.cube .front {transform: translateZ(100px);color: white;background: rgba(250,10,55,.5);}
.cube .back {transform: rotateY(180deg) translateZ(100px);color: green;background: rgba(100,20,210,.5);}
.cube .left {transform:rotateY(-90deg) translateZ(100px);color: green;background: rgba(90,20,250,.5);}
.cube .right {transform: rotateY(90deg) translateZ(100px);color: red;background: rgba(90,200,10,.5);}
.cube .top {transform:rotatex(90deg) translateZ(100px);color: white;background: rgba(0,0,0,.5);}
.cube .bottom {transform:rotatex(-90deg) translateZ(100px);color: green;background: rgba(255,255,0,.5);}
من میخوام یه مکعب سه بعدی با CSS بسازم ولی بیشتر شبیه این مانیتور های CRT میشه تا مکعب
این لینک رو ببینید : http://s.7learn.com/uploads/2014/09/cube2.html
میخوام این شکلی بشه ولی نمیشه نمیفهمم هم چرا
اگه امکانش هست بگید مشکلش توی چیه؟
این کدهای من
<html>
<head>
<link type="text/css" href="cube.css" rel="stylesheet" />
</head>
<body>
<div class="cube-container">
<div id="cube" class="cube">
<div class="front">front</div>
<div class="back">back</div>
<div class="left">left</div>
<div class="right">right</div>
<div class="top">top</div>
<div class="bottom">bottom</div>
</div>
</div>
</body>
</html>
اینا هم CSS هاش:
.cube{
perspective: 800px;
width: 200px;
height: 200px;
margin: 50px auto;
position: relative;
transform-style: preserve-3d;
perspective-origin:50% 50%;
animation:rotate 3s linear infinite;
}
@keyframes rotate {
from{transform:rotateY(0deg);}
to{transform:rotateY(360deg);}
}
.cube > div{
border:1px solid black;
position: absolute;
text-align: center;
line-height: 200px;
width: 200px;
height: 200px;
}
.cube .front {transform: translateZ(100px);color: white;background: rgba(250,10,55,.5);}
.cube .back {transform: rotateY(180deg) translateZ(100px);color: green;background: rgba(100,20,210,.5);}
.cube .left {transform:rotateY(-90deg) translateZ(100px);color: green;background: rgba(90,20,250,.5);}
.cube .right {transform: rotateY(90deg) translateZ(100px);color: red;background: rgba(90,200,10,.5);}
.cube .top {transform:rotatex(90deg) translateZ(100px);color: white;background: rgba(0,0,0,.5);}
.cube .bottom {transform:rotatex(-90deg) translateZ(100px);color: green;background: rgba(255,255,0,.5);}