title: How to show selection around a div like the image given below
body: <p> <img src="https://i.stack.imgur.com/M8W4R.png" alt="Whenever user ckicks the div border should appear around it along with re-sizing and rotating handles as shown in the figure "></p>
  
  <p>One method to achieve this is using 
  border in css and using eight square divs and place it at positions
  (0,0), (0,w/2), (0,w)
  (h/2,0) , (h,0)
  (h,w) , (h/2,w)
  where h= height of div, w= width of shape</p>
  
  <p>Is there any easier method than this??</p>