+ 3

CSS - possibility

Is it possible to make a hole through a block? - you have a block. Inside block, you have another small block. Can you transparent the small block backgroundColor so the color behind the small block is transparent too? So you basically make a hole in into a block !'?

3rd Jun 2019, 4:09 AM
Ginfio
Ginfio - avatar
7 Respuestas
+ 2
you could either have 2 blocks on top of eachother where the smaller box is the same as the background and you keep it off limits or, you create 4 blocks and surround a peice you want to ignore. If I had to I'd probably do the first one
3rd Jun 2019, 4:21 AM
koala 🐨
koala 🐨 - avatar
6th Jun 2019, 8:23 AM
jay goti
jay goti - avatar
+ 1
good idea koala ✔️
3rd Jun 2019, 4:22 AM
Ginfio
Ginfio - avatar
+ 1
thank you Ginfio, but I'm still wondering something myself. what if you wanted to add text but you want it to skip over the small block? I'm trying to look it up right now, edit: but it seems confusing lol :]
3rd Jun 2019, 4:24 AM
koala 🐨
koala 🐨 - avatar
+ 1
Hi Ginfio, a hole through a block is possible, but using an another trick ;) See this: https://code.sololearn.com/Wp79OpLluG3K/?ref=app
3rd Jun 2019, 6:44 AM
777
777 - avatar
+ 1
rv7 im sad i didnt think of that lol, good idea
3rd Jun 2019, 6:51 AM
koala 🐨
koala 🐨 - avatar
+ 1
It is possible by position property in css.
6th Jun 2019, 8:25 AM
jay goti
jay goti - avatar