background-clip css
<!DOCTYPE html>
<html>
<head>
<style>
.div1{
border: 10px dashed red;
background: lightgreen;
height: 100px;
background-clip: border-box;
padding: 20px;
}
.div2{
border: 10px dashed red;
background: lightgreen;
height: 100px;
background-clip: padding-box;
padding: 20px;
}
.div3{
border: 10px dashed red;
background: lightgreen;
height: 100px;
background-clip: content-box;
padding: 20px;
}
</style>
</head>
<body>
<h2>background-clip: border-box;</h2>
<div class="div1">
This is the content area of this div element.
</div>
<h2>background-clip: padding-box;</h2>
<div class="div2">
This is the content area of this div element.
</div>
<h2>background-clip: content-box;</h2>
<div class="div3">
This is the content area of this div element.
</div>
</body>
</html>