Created
September 2, 2014 18:32
-
-
Save iflamed/c2b963f2b0a8eb8da29c to your computer and use it in GitHub Desktop.
A Pen by 刘兵.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="draggable"> | |
<div class="rotatable"> | |
<div class="resizable"> | |
<div class="blockcontent"> | |
<h1>Hello,world</h1> | |
</div> | |
</div> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.draggable').draggable({ containment: "parent" }); | |
$('.resizable').resizable({ | |
aspectRatio: false, | |
handles: 'ne, se, sw, nw', | |
maxWidth: 300, | |
maxHeight:300 | |
}); | |
$('.resizable').parent().rotatable(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.draggable | |
{ | |
position: relative; | |
display: -moz-inline-stack; | |
display: inline-block; | |
vertical-align: top; | |
zoom: 1; | |
*display: inline; | |
cursor: hand; | |
cursor: pointer; | |
} | |
.resizable | |
{ | |
width: 100px; | |
border: 1px solid #ECEBE5; | |
} | |
.resizable .blockcontent{ | |
width:100%; | |
overflow:hidden; | |
} | |
.resizable img | |
{ | |
width: 100%; | |
} | |
.ui-resizable-handle | |
{ | |
background: #ECEBE5; | |
border: 1px solid #ECEBE5; | |
border-radius:10px; | |
width: 10px; | |
height: 10px; | |
z-index: 2; | |
} | |
.ui-resizable-se | |
{ | |
right: -5px; | |
bottom: -5px; | |
} | |
.ui-rotatable-handle | |
{ | |
background: #f5dc58; | |
border: 1px solid #FFF; | |
border-radius: 5px; | |
-moz-border-radius: 5px; | |
-o-border-radius: 5px; | |
-webkit-border-radius: 5px; | |
cursor: pointer; | |
height: 10px; | |
left: 50%; | |
margin: 0 0 0 -5px; | |
position: absolute; | |
top: -5px; | |
width: 10px; | |
} | |
.ui-rotatable-handle.ui-draggable-dragging | |
{ | |
visibility: hidden; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment