Skip to content

Instantly share code, notes, and snippets.

@iflamed
Created September 2, 2014 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iflamed/c2b963f2b0a8eb8da29c to your computer and use it in GitHub Desktop.
Save iflamed/c2b963f2b0a8eb8da29c to your computer and use it in GitHub Desktop.
A Pen by 刘兵.
<div class="draggable">
<div class="rotatable">
<div class="resizable">
<div class="blockcontent">
<h1>Hello,world</h1>
</div>
</div>
</div>
</div>
$('.draggable').draggable({ containment: "parent" });
$('.resizable').resizable({
aspectRatio: false,
handles: 'ne, se, sw, nw',
maxWidth: 300,
maxHeight:300
});
$('.resizable').parent().rotatable();
.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