jquery - CSS - bevel square and turn -


i need edit css square shown below. please advice how combine transform skew , rotate?

from:

enter image description here

to:

enter image description here

my atempt: jsfiddle

.square {   background: #fff;   border:2px solid red;   height: 200px;   width: 200px;   margin:100px;   transform:  skewx(-30deg) rotate(45deg); } 

thanks

let's consider need :

  • rotate (z-axis) - square rotated @ 45° angle, need handle this. easiest angle notice.
  • rotate (x-axis) - it's difficult discern exact angle need rotate backwards, may need play this angle right.

applying transforms

with being said, can use transform property along appropriate browser implementations of :

.special-rotate {     -ms-transform: rotatex(45deg) rotatey(0deg) rotatez(45deg);     -webkit-transform: rotatex(45deg) rotatey(0deg) rotatez(45deg);     transform: rotatex(45deg) rotatey(0deg) rotatez(45deg); } 

this give looks following example, should point can determine values looking :

enter image description here

#square {    margin: 0 auto;    height: 200px;    width: 200px;    background: red;    -ms-transform: rotatex(45deg) rotatey(0deg) rotatez(45deg);    -webkit-transform: rotatex(45deg) rotatey(0deg) rotatez(45deg);    transform: rotatex(45deg) rotatey(0deg) rotatez(45deg);  }
<div id='square'></div>


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo