o1-preview-2024-09-12· OpenAI
WildChat-4.8M (AI2)
.box { position: relative; width: 200px; height: 200px; background-image:…
- User
.box { position: relative; width: 200px; height: 200px; background-image: linear-gradient(to right, #ff7e5f, #feb47b); z-index: 1; }
.box::after { content: ''; position: absolute; top: -10px; left: -10px; right: -10px; bottom: -10px; background-color: skyblue; z-index: 0; }
pq o ::after não fica atrás do .box?
- Assistant
O motivo pelo qual o pseudo-elemento não fica atrás do é devido ao contexto de empilhamento (stacking context) estabelecido pelos valores de e .