Labels

php (35) javascript (31) phpjavascript (30) jquery (23) html (20) mysql (14) database (9) codeigniter (4) json (4) bar chart (2) calendar (2) column chart (2) framework (2) google maps (2) query (2) tables (2) url (2) dropdown (1)

Tuesday, May 29, 2018

Animated 3D Cube Using HTML CSS JAVASCRIPT

Animated 3D Cube Using HTML CSS JAVASCRIPT


<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="https://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<title>CSS3 3D Cube</title>
<style>
body{line-height:1}
nav ul{list-style:none}
blockquote,q{quotes:none}
blockquote:before,blockquote:after,q:before,q:after{content:none}
a{margin:0;padding:0;font-size:100%;vertical-align:baseline;background:transparent}
ins{background-color:#ff9;color:#000;text-decoration:none}
mark{background-color:#ff9;color:#000;font-style:italic;font-weight:bold}
del{text-decoration:line-through}
abbr[title],dfn[title]{border-bottom:1px dotted;cursor:help}
table{border-collapse:collapse;border-spacing:0}
hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}
input,select{vertical-align:middle}
a, a:visited {
color: #0101d0;
font-weight: bold;
cursor: pointer;
font-size: 20px;
font-family: arial;
line-height: 20px;
display: inline-block;
padding: 10px;
}
a:hover {
color: #000;
}
#wrapD3Cube {
width: 250px;
height: 213px;
margin: 20px auto;
background-color: #EEE;
}
#D3Cube {
width: 112px;
height: 112px;
top: 50px;
transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-webkit-transform-style: preserve-3d;
transform: rotateX(-22deg) rotateY(-38deg) rotateZ(0deg);
-moz-transform: rotateX(-22deg) rotateY(-38deg) rotateZ(0deg);
-webkit-transform: rotateX(-22deg) rotateY(-38deg) rotateZ(0deg);
margin: auto;
position: relative;
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
}
#D3Cube > div {
position: absolute;
-webkit-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
width: 112px;
height: 112px;
float: left;
overflow: hidden;
opacity: 0.85;
}
#side1 {
transform: rotatex(90deg) translateX(0px) translateY(0px) translateZ(56px);
-moz-transform: rotatex(90deg) translateX(0px) translateY(0px) translateZ(56px);
-webkit-transform: rotatex(90deg) translateX(0px) translateY(0px) translateZ(56px);
background-color: #ff0000;
}
#side2 {
transform: rotateY(-90deg) translateX(0px) translateY(0px) translateZ(56px);
-moz-transform: rotateY(-90deg) translateX(0px) translateY(0px) translateZ(56px);
-webkit-transform: rotateY(-90deg) translateX(0px) translateY(0px) translateZ(56px);
background-color: #4d0000;
}
#side3 {
transform: translateX(0px) translateY(0px) translateZ(56px);
-moz-transform: translateX(0px) translateY(0px) translateZ(56px);
-webkit-transform: translateX(0px) translateY(0px) translateZ(56px);
background-color: #006600;
}
#side4 {
transform: rotateY(90deg) translateX(0px) translateY(0px) translateZ(56px);
-moz-transform: rotateY(90deg) translateX(0px) translateY(0px) translateZ(56px);
-webkit-transform: rotateY(90deg) translateX(0px) translateY(0px) translateZ(56px);
background-color: #000066;
}
#side5 {
transform: rotateY(180deg) translateX(0px) translateY(0px) translateZ(56px);
-moz-transform: rotateY(180deg) translateX(0px) translateY(0px) translateZ(56px);
-webkit-transform: rotateY(180deg) translateX(0px) translateY(0px) translateZ(56px);
background-color: #602020;
}
#side6 {
transform: rotateX(-90deg) translateX(0px) translateY(0px) translateZ(56px);
-moz-transform: rotateX(-90deg) translateX(0px) translateY(0px) translateZ(56px);
-webkit-transform: rotateX(-90deg) translateX(0px) translateY(0px) translateZ(56px);
background-color: #3399ff;
}
</style>
</head>
<body>
<div id="wrapD3Cube">
<div id="D3Cube">
<div id="side1"></div>
<div id="side2"></div>
<div id="side3"></div>
<div id="side4"></div>
<div id="side5"></div>
<div id="side6"></div>
</div>
</div>
<p style="text-align: center;">
<a onclick="turnLeft()">Left</a>
<a onclick="turnRight()">Right</a> <br />
<a onclick="flipCube()">Flip</a>
</p>
</body>
<script>
var cubex = -22, // initial rotation
cubey = -38,
cubez = 0;
function rotate(variableName, degrees) {
window[variableName] = window[variableName] + degrees;
rotCube(cubex, cubey, cubez);
}
function rotCube(degx, degy, degz){
segs = "rotateX("+degx+"deg) rotateY("+degy+"deg) rotateZ("+degz+"deg) translateX(0) translateY(0) translateZ(0)";
$('#D3Cube').css({"transform":segs});
}
function turnRight() {
rotate("cubey", 90);
}
function turnLeft() {
rotate("cubey", -90);
}
function flipCube() {
rotate("cubez", -180);
}
</script>
</html>

Result






74 comments:

  1. Great blog, your blog looks amazing to reed & Thanks for postingLed High Bay Lights

    ReplyDelete
  2. Great article, Great content with all the helpful information.

    Visit architectural design studio!

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. Very nice article
    thanks for sharing with us, keep posting.
    for more information visit: https://bit.ly/2t6Vrcv

    ReplyDelete
  5. Buy Tazzle 10mg Online, Generic Cialis 10 mg in USA Buy Tazzle 10 Fm from Trusted Online Pharmacy.

    ReplyDelete
  6. Will start following your blog. Great article indeed. Very helpful. will surely recommend this to my friends

    ReplyDelete
  7. Buy Tazzle 10mg Online, Generic Cialis 10 mg in USA Buy Tazzle 10 Fm from Trusted Online Pharmacy.

    ReplyDelete

  8. wave cityInfratech is a leading a real estate company in all over Delhi/NCR.

    ReplyDelete
  9. The fastest method to do that is to buy cheap fb followers. This isn’t for absolutely everyone but it’s by far the fastest and easiest way to do it. In any other case, you will want to look at a few strategies for natural growth which may additionally get you the quantity of likes you want but will take notably longer to get there.

    ReplyDelete
  10. Things are very open and intensely clear explanation of issues. was truly information. Your website is very beneficial.
    hotmail sign up login

    ReplyDelete
  11. Buy Tazzle 10mg Online is a phosphodiesterase (PDE-5) inhibitor. It works in erectile dysfunction by increasing blood flow to the penis by relaxing the muscles in penile blood vessels. It works in pulmonary hypertension by relaxing the blood vessels in the lungs to allow blood to flow more easily.

    ReplyDelete
  12. Buy Tazzle 10mg Online is used for Enlarged prostate gland in male, Increased blood pressure in lungs and other conditions. Know about the uses, side effects, price, composition, substitutes, How it works, Lowest Price Online. Tazzle 10 mg Online buy with lowest Price Ever Online Pharmacy. Tazzle 10mg Reviews.

    ReplyDelete
  13. Well, Thanks for sharing such a informative content with us.

    ReplyDelete
  14. Well, Thanks for sharing such a informative content with us.

    ReplyDelete
  15. This article is very nice.
    If you are using roadrunner email account and facing any problems regarding its services, then you can directly contact our roadrunner customer service helpline number +1-888-338-6033.

    ReplyDelete
  16. Buy Eriacta 100mg Online is a generic Viagra. Eriacta features Sildenafil Citrate that is not dissimilar to the one seen in Viagra. The major reason behind using Eriacta 100 by men is as they might be suffering from impotence problems. Eriacta 100mg features Sildenafil Citrate that is not dissimilar to the one seen in Viagra. Using Eriacta helps treatment of impotence problems.

    ReplyDelete
  17. Thanks so much for this very helpful article.

    ReplyDelete
  18. Awesome post. Very helpful article I am a regular visitor of your blog and appreciate you taking the time to maintain the excellent site

    ReplyDelete
  19. Such an amazing post!!
    If you want roadrunner email setup, contact roadrunner toll free helpline +1-888-338-6033.

    ReplyDelete
  20. Buy Pulmopres 20mg Online is used for Enlarged prostate gland in male, Increased blood pressure in lungs and other conditions. Know about the uses, side effects, price, composition, substitutes, How it works, Lowest Price Online. Pulmopres 20mg Online buy with lowest Price Ever Online Pharmacy. Pulmopres 20mg Reviews.

    ReplyDelete
  21. Buy Eriacta 100mg Online is a generic Viagra. Eriacta features Sildenafil Citrate that is not dissimilar to the one seen in Viagra. The major reason behind using Eriacta 100 by men is as they might be suffering from impotence problems. Eriacta 100mg features Sildenafil Citrate that is not dissimilar to the one seen in Viagra. Using Eriacta helps treatment of impotence problems.

    ReplyDelete
  22. Such an amazing post!!
    If anyone troubling to set up Roadrunner Email Server Settings, contact roadrunner toll free helpline +1-888-338-6033.

    ReplyDelete
  23. Buy Tazzle 20mg Online is used for Enlarged prostate gland in male, Increased blood pressure in lungs and other conditions. Know about the uses, side effects, price, composition, substitutes, How it works, Lowest Price Online. Tazzle 20 mg Online buy with lowest Price Ever Online Pharmacy. Tazzle 20mg Reviews.

    ReplyDelete
  24. Such an amazing post!!
    If you want Canon Printer Setup, contact roadrunner toll free helpline +1-833-226-4222.

    ReplyDelete
  25. Buy Vilitra 10mg Online is an oral drug that is used to treat impotence or erectile dysfunction, where a man can not attain or maintain an erection. An erection is achieved when there is an engorgement of blood in the penis. Upon sexual stimulation, nitric oxide is produced and released.

    ReplyDelete
  26. Hi, So much Thanks for the share. It was very helpful to us. Very informative post. I am Herman F. Markel working with Norton Security Error 8504 USA. If any users facing any Norton technical issue, our technicians can guide you. Take quickly help at Norton Support +18555583999 to induce instant. Norton Support to resolve technical problems.

    ReplyDelete
  27. Buy Eriacta 100mg Online is used for Enlarged prostate gland in male, Increased blood pressure in lungs and other conditions. Know about the uses, side effects, price, composition, substitutes, How it works, Lowest Price Online Eriacta 100mg Online buy with lowest Price Ever Online Pharmacy. Eriacta 100mg Reviews.

    ReplyDelete
  28. Buy Tadagra prof 20mg Online sublingual tablet, contains Tadalafil, the same as Cialis, and is manufactured by RSM Enterprises in India.  Hence, Tadagra Prof 20mg is also known as generic Cialis. Take it 2 hours before. Once taken it, do not take it again within 48 hours. Its effectiveness lasts 36 hours. It can be taken with or without food.

    ReplyDelete
  29. Buy Tazzle 20mg online relaxes the smooth muscles present in the wall of blood vessels and helps in increasing the flow of blood in certain specific areas of the body. It is used for the treatment of erection disorders, prostate gland enlargement and Pulmonary Hypertension (high blood pressure of blood vessels connecting the lungs and the heart).

    ReplyDelete
  30. Buy Tadalista 40mg Online is an oral medication for the treatment of erectile dysfunction (ED). buy tadalista online is containt of Tadalafil. Know about Tadalista uses , Price , How to take , Side Effect , How to use tadalista .cheap tadalista in USA from Medypharma.

    ReplyDelete
  31. Buy Week Pack Kamagra Oral Jelly Online (Sildenafil Citrate) is a prominent medication which unwinds muscular tissues and boosts blood radiance to certain locations of the body. It is mainly utilized to manage impotence erectile dysfunction in males.

    ReplyDelete
  32. Buy Vidalista CT 20mg Online is contain of Tadalafil. Vidalista Ct 20 is manufatured by Centurion Lab. Buy Vidalista ct 20 from your most reliable Trusted online pharmacy Medypharma. by your doorsteps, Avail best price in USA. Cheap Vidalista Online in USA. cialis vidalista, vidalista 20.

    ReplyDelete
  33. Buy Vilitra 40mg Online Vardenafil is the most potent and effective erectile dysfunction medication and works for almost all men. It has a fast action time and last up to 50% longer than Sildenafil. Vardenafil is more expensive to manufacture than sildenafil tablets but the price is easily justified by the excellent results.

    ReplyDelete
  34. I really appreciate the kind of topics you post here
    Kindle won't connect to wifi

    ReplyDelete
  35. Buy Suhagra Force 50 mg Online relaxes the smooth muscles present in the wall of blood vessels. Suhagra Force 50 Reviews From Trusted Pharmacy Medypharma. Know about Suhagra force 50 mg uses , side Effects ,Price , How to take. Get More Discount and offer From Medypharma.

    ReplyDelete
  36. Buy Fildena 100mg Online is used for Enlarged prostate gland in male, Increased blood pressure in lungs and other conditions. Know about the uses, side effects, price, composition, substitutes, How it works, Lowest Price Online Fildena 100mg Online buy with lowest Price Ever Online Pharmacy. Fildena 100mg Reviews.

    ReplyDelete
  37. Buy Tadalista 40mg Online is an oral medication for the treatment of erectile dysfunction (ED). buy tadalista online is containt of Tadalafil. Know about Tadalista uses , Price , How to take , Side Effect , How to use tadalista .cheap tadalista in USA from Medypharma.

    ReplyDelete
  38. Buy Cenforce 50mg Online is used to treat erectile dysfunction (ED). Sildenafil citrate 50 mg cenforce from Online Pharmacy Medypharma. cenforce 50 review, Cheap cenforce 50 online. Buy generic viagra from Trusted online pharmacy Medypharma, Free home delivery on Order above $249 !

    ReplyDelete
  39. Buy Cenforce D Online is a combination of drug containing Sildenafil citrate 100mg and Dapoxetine hydrochloride 60mg, used in the treatment of erectile dysfunction. know more about Cenforce d side effect, price, dosage, review, How to take it. Buy cenforce d from Medypharma. Order Now!

    ReplyDelete
  40. Buy Cenforce 120mg Online is used to treat erectile dysfunction (ED). ED is the inability to get or maintain an erection. Sildenafil citrate 120 mg cenforce from Online Pharmacy Medypharma. cenforce 120 review, centurion laboratories cenforce , Cheap cenforce 120 online.

    ReplyDelete
  41. Buy Tadarise 60mg Online is generic Cialis, an erectile dysfunction medication based on Tadalafil. Know about tadarise uses, How to take, Side Effect, How to use Tadarise . buy Tadarise 60 From your most reliable Trusted online pharmacy Medypharma. Avail best price in USA. super tadarise.

    ReplyDelete
  42. Buy Super Vidalista Online is used for Enlarged prostate gland in male, Increased blood pressure in lungs and other conditions. Know about the uses, side effects, price, composition, substitutes, How it works, Lowest Price Online. Super Vidalista Online buy with lowest Price Ever Online Pharmacy. Super Vidalista Reviews.

    ReplyDelete
  43. buy Tadalista 60mg online is treatment of erectile dysfunction. buy tadalista online from your most reliable Trusted online pharmacy Medypharma. Avail best price in USA, by your doorsteps.Know about Tadalista 60 Side Effect ,uses , Price , How to take , How to use . tadalista 60 review , tadalaful 60 mg online

    ReplyDelete
  44. Buy Fildena 120mg Online is used for Enlarged prostate gland in male, Increased blood pressure in lungs and other conditions. Know about the uses, side effects, price, composition, substitutes, How it works, Lowest Price Online Fildena 120mg Online buy with lowest Price Ever Online Pharmacy. Fildena 120mg Reviews.

    ReplyDelete
  45. Buy Tadarise Pro 20mg Online is another name of Tadalafil. It is a medium potency medicine to cure erectile dysfunction. tadarise pro 20 manufactured by Sunrise Remedies . Know about tadarise pro 20 Side Effect, uses , Price , How to take, How to use tadarise pro 20 mg. tadarise pro 20 review.

    ReplyDelete
  46. Buy Tadarise Pro 20mg Online is another name of Tadalafil. It is a medium potency medicine to cure erectile dysfunction. tadarise pro 20 manufactured by Sunrise Remedies . Know about tadarise pro 20 Side Effect, uses , Price , How to take, How to use tadarise pro 20 mg. tadarise pro 20 review.

    ReplyDelete

More Posts

FOLLOW