```html
<style>
.ui-state-active {
  color: #fff;
  background:red;
  #box-shadow: inset -7px 7px 9px -7px #236c4d;
  width:50px;
  height:50px;
}
.ui-state-active:hover{
 box-shadow: inset 15px 7px 9px -7px #fff;
 box-shadow: inset -7px 7px 9px -7px #fff;
}
</style>
<div class="ui-state-active">18
</div>
```

I need something like this, when i hovered on a div it show a transformed triangle on top right like shown in image, I just explained my requirement as image for clear clarification[![enter image description here](https://i.stack.imgur.com/D8QEz.png)](https://i.stack.imgur.com/D8QEz.png)