background clip css

Solutions on MaxInterview for background clip css by the best coders in the world

showing results for - "background clip css"
Mila
02 Jun 2016
1<!DOCTYPE html>
2<html>
3<head>
4   <style>
5	.div1{
6        border: 10px dashed red;
7        background: lightgreen;
8        height: 100px;
9        background-clip: border-box;
10        padding: 20px;
11    }
12    .div2{
13        border: 10px dashed red;
14        background: lightgreen;
15        height: 100px;
16        background-clip: padding-box;
17        padding: 20px;
18    }
19    .div3{
20        border: 10px dashed red;
21        background: lightgreen;
22        height: 100px;
23        background-clip: content-box;
24        padding: 20px;
25    }
26   </style>
27</head>
28<body>
29	<h2>background-clip: border-box;</h2>
30	<div class="div1">
31	    This is the content area of this div element.
32    </div>
33    
34	<h2>background-clip: padding-box;</h2>
35	<div class="div2">
36	    This is the content area of this div element.
37	</div>
38	
39	<h2>background-clip: content-box;</h2>
40	<div class="div3">
41	    This is the content area of this div element.
42	</div>
43</body>
44</html>
similar questions
css background image fade