How to Create Paradoxical Effect using CSS ? Last Updated : 14 Feb, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report Paradoxical effect is the effect where the divs or the elements are placed in circular form top of each other. This type of effect is useful when you want to design a circular button that opens up when you hover and each button assigns some task and place like the top of each other. In the below example, we will use z-index. Placing like this is needed to be expert on position property and top, left, right, and bottom property. Then you can easily design paradoxical effects. Below examples illustrate the approach to create paradoxical effect: Example 1: html <!DOCTYPE html> <html> <head> <title>Paradoxical effect by HTML and CSS</title> <style> h1 { color: green; } div { height: 200px; width: 200px; line-height: 200px; color: white; font-size: 24px; font-weight: bold; } .box1 { position: relative; background-color: green; z-index: 3; } .box2 { position: relative; left: 140px; top: -60px; background-color: blue; z-index: 3; } .box2:before { content: ''; position: absolute; bottom: -2px; left: -2px; width: 62px; height: 60px; z-index: 14; background-color: red; } .box3 { position: relative; left: 0; top: -120px; background-color: red; z-index: 1; } .box4 { position: relative; left: -140px; top: -465px; background-color: yellow; z-index: 2; } </style> </head> <body> <center> <h1>GeeksforGeeks</h1> <h3>A Computer Science Portal for Geeks</h3> <div class="box1">Box1</div> <div class="box2">Box2</div> <div class="box3">Box3</div> <div class="box4">Box4</div> </center> </body> </html> Output: Example 2: html <!DOCTYPE html> <html> <head> <title> Paradoxical effect by HTML and CSS </title> <style> h1 { color: green; } div { height: 100px; width: 100px; border: solid 1px; border-radius: 50%; } .Circle1 { position: relative; left: 0px; background-color: green; z-index: 1; } .Circle2 { position: relative; left: 70px; top: -70px; background-color: purple; z-index: 2; } .Circle3 { position: relative; left: 40px; top: -90px; background-color: brown; z-index: 3; } .Circle3:before { content: ''; position: absolute; bottom: 15px; left: -5px; width: 22px; height: 62.9px; border-right: 1px solid black; z-index: 20; background-color: pink; border-radius: 50%; } .Circle4 { position: relative; left: -70px; top: -270px; background-color: yellow; z-index: -1; } .Circle5 { position: relative; left: -40px; top: -290px; background-color: pink; z-index: -2; } div { text-align: center; } </style> </head> <body> <center> <h1>GeeksforGeeks</h1> <h3> A Computer Science Portal for Geeks </h3> <div class="Circle1"></div> <div class="Circle2"></div> <div class="Circle3"></div> <div class="Circle4"></div> <div class="Circle5"></div> </center> </body> </html> Output: Comment More infoAdvertise with us Next Article How To Create Carved Text Effect using CSS? S skyridetim Follow Improve Article Tags : CSS CSS-Misc HTML-Misc Similar Reads How to create a marquee effect using CSS ? In this article, we will be creating the marquee effect by using HTML and CSS. This effect can be created by using the <marquee> tag in HTML, but we will not use this tag as it is not widely used nowadays. We will create and design a marquee effect by using the CSS classes and styling properti 2 min read How to create a drop shadow effect using CSS ? In this article, we are going to learn how to create a drop shadow effect using CSS. drop-shadow() is an inbuilt function used to create a blurred shadow in a given offset and color. A drop shadow effect adds depth and visual interest to elements on a web page by creating a shadow behind them. This 3 min read How To Create Carved Text Effect using CSS? The carved text effect is also known as the embossed effect as it looks like the text has been embossed on a background. It is also known as Neumorphism in CSS. This effect is used when we want to give our website a clean and refreshing look. The embedded text can be of the same color as the backgro 2 min read How to Add Onclick Effect using CSS ? In this article, weâll explore how to create an onclick effect using CSS. While the onclick event is generally associated with JavaScript, about 30â40% of basic visual feedback effectsâsuch as color changes, button presses, or shadow effectsâcan be achieved using CSS alone through the :active pseudo 2 min read How to Create Embossed Text Effect using CSS ? The embossed text effect creates a 3D illusion, making text appear raised or pressed into the page. Using CSS, this effect is achieved by applying contrasting text-shadow values that simulate light and shadow, giving the text a visually elevated or indented appearance.Approach:Basic HTML Structure: 2 min read How to Create Parallax Effect in Tailwind CSS ? A parallax website includes fixed images in the background that are kept in place and the user can scroll down the page to see different parts of the image. If you use the parallax effect on our page then it helps the user to interact with the page. PreviewCreating Parallax Effect in Tailwind CSS At 3 min read Like