JSFiddle - React, Tailwind, and code Playground

by delebash

HTML

<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<div class="draggable">
    <div class="rotatable">
        <div class="resizable">
            <label> test </label>
        </div>
    </div>
</div>

CSS

.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 #bb0000;   
}
.resizable img
{
    width: 100%;   
}

.ui-resizable-handle 
{
    background: #f5dc58;
    border: 1px solid #FFF;
    width: 9px;
    height: 9px;
    
    z-index: 2;
}
.ui-resizable-n
{
    left:50%; margin-left:-6px;
}
.ui-resizable-e
{
    top:50%; margin-top:-6px;
}
.ui-resizable-w
{
    top:50%; margin-top:-6px;
}
.ui-resizable-s
{
    left:50%; margin-left:-6px;
}
.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;
}

JavaScript

$('.draggable').draggable();

$('.resizable').resizable({

    handles: 'ne,n,nw,s,se,sw,e,w'
});