I am trying to add border on hover for an element. But, it feels like jumps a little bit inside.
Note: I know I can add outline to achieve this, but outline doesn't have border-radius.
How can I do this?
<!DOCTYPE html>
<html>
<head>
<style>
p{
width: 130px;
min-height: 30px;
padding: 10px;
border-radius: 12px;
outline: 1px solid green;
background: yellow;
}
p:hover{
border: 1px solid black;
}
</style>
</head>
<body>
<p style="color:red;">A red paragraph.</p>
</body>
</html>