Bottom 巾 — pictograph of a hanging cloth, the indexing radical of 帘 even though it sits under 穴. The compound ideograph reads 'cloth in an opening' — exactly a curtain. Same radical family: 帽 hat, 布 cloth, 帆 sail — all pieces of fabric.
Top 穴 — pictograph of a cave mouth or framed opening, here representing the window or doorway. It is not the indexing radical: 穴 contributes the picture of an aperture that needs covering, the architectural slot a curtain fits into.