0
If I put a background-clip: content-box property to a div, how can I change the background-color of the content outside of the content box? It is displayed in the middle but I don't know how to change the color of the edge.
5 Respostas
0
Be more explicit
0
Now I edited it and I tried to be as specific as I possibly can
0
try this:
body {
background-color: #87CEFA;
}
div {
background-clip:content-box ;
background-color:red;
}
0
may be..
1)you can add a padding like 20px and 1 content-box 1 padding-box ?
set a margin property may help too.
or
2) add a thick border and add color to like border:20px solid rgba(0,20,30,1)
- 1
I am in this section too. From your description, perhaps we can try two clips at the time. That is two colors? Let me try it now!
after exercise, two problems: 1. can't apply two clips at the same time. 2. border-box apply clip only on the border, not outside of it.