Ways to eliminate a specific section of a picture

I'm working on a unique component design that involves showcasing images in a creative layout, with the first image displayed prominently while the rest form a half-circle around it.

However, I'm facing some issues regarding clipping the portion of the second image using a specific class. The goal is to achieve a visual effect similar to the one illustrated in the attached image below.

Images.js

const Images = ({ images = [] }) => {
  return (
    <div>
      {images?.map((image, index) => {
        const isFirst = index === 0;
        return (
          <img
            src={image.url}
            alt={image.title}
            key={image.title}
            className={isFirst ? "" : "semi-circle"}
          />
        );
      })}
    </div>
  );
};

export default Images;

style.css

img {
  border-radius: 50%;
  width: 100px;
  height: 100px;
}

.semi-circle {
  clip: rect(0px, 25px, 25px, 0px);
}

Could anyone provide insight into what might be going wrong here?

Sandbox

To better understand the intended outcome, check out this reference image:

this

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What could be the reason for the Mongoose findAll function causing a 500 error to occur?

My model / Schema has a working create method, but the "all" method is causing a 500 error. var mongoose = require('mongoose'); var Schema = mongoose.Schema; var DiSchema = new mongoose.Schema({ name: { type: String, lowercase: true , require ...

A quick demonstration of the node.js console.clear() method in action with a straightforward code snippet

Can someone provide me with a clear example of how to use the console.clear() method from the console module in node.js? I've searched extensively on stackoverflow but haven't found anything useful. console.log("Content printed in file"); con ...

Eliminate the need for jQuery when performing basic text rotation operations

Currently, I find myself loading an entire jQuery library for a task that could be achieved with much simpler code. The task involves cycling through a list of text spans to display different messages each time. Below is the existing code: (function($) ...

Creating an illuminated atmosphere: How to place a light source within a container using ThreeJS

Attempting to replicate the luminous box from Beat Saber in ThreeJS: https://i.sstatic.net/6IUmp.png Initiated by crafting a shape in Blender and exporting an OBJ. Imported it into Three, simply as geometry: https://i.sstatic.net/BGA1n.png Subsequently ...

Create a smoothly animated skewed div without any unwanted side effects

Recently, I had an idea to create a unique menu using parallelogram containers and animate them with CSS. My concept involved changing the height of the parallelogram when hovering over an item to achieve a visually appealing scaling effect. However, whil ...

There was a TypeError encountered when attempting to read the length property of a null value in the Google Map JSON data

I keep getting an Uncaught TypeError: Cannot read property 'length' of null error when I attempt to use JSON data as markers on my Google map. However, when I check console.log(data);, it shows that the data is fine. What could be causing this is ...

I found that when using a variable with a dynamic value in a function, it is preventing me from successfully submitting a form through ajax

Many forms with different classes are present on a single page, each having two buttons to submit the parent form. The form submission occurs upon clicking either #avote_down or #avote_up. The script captures the class of the parent form of the clicked bu ...

Automatically populate input fields by extracting data from the URL using BootstrapVue

Utilizing BootstrapVue, I am attempting to populate my input fields based on the URL provided. This is my current code: <template> <div class="col-md-6 mt-3"> <div class="mt-2">ID</div> <b-form-inpu ...

Angular-material's Md-dialog popup box is displayed as a separate view within the Yeoman framework

I have recently created a project using Yeoman (angular-fullstack, angular-material) and encountered an issue with triggering the md-dialog box. When clicking on a div element, the dialog box is supposed to appear. However, instead of showing the popup the ...

Adding several entries into mysql with the assistance of php

I've been attempting to input multiple records into my database table, but every time I try, all I see are zeros(0) inserted into the fields. Here's what I attempted: I used a foreach loop for insertion, but unfortunately it doesn't seem to ...

Having difficulty deleting items with Three.JS

I'm currently using Three.JS to create a plane and add some boxes on top of it. I occasionally need to remove all the boxes. To achieve this, I have attempted using the code snippet below: for (i = 0; i < scene.children.length; i++) { var obje ...

Changing the CSS property in an external SVG image to customize its appearance

I currently have an assortment of html and svg files that include: home.html <html> <head> <style> span { filter: invert(100%) } </style </head> <body> <span><img src="my.svg" /></span> ...

How can you modify the background color of a selected or hovered Bootstrap 4.6 select option?

When using Bootstrap 4.6, all my form select dropdowns seem to be displaying with a blue background like in this image: https://i.sstatic.net/Vqsxw.png In my .scss file, I have set it up as follows: // Custom Variables @import '../../vendor/bootstr ...

What is causing the horizontal misalignment of these divs? Why are they breaking onto separate lines?

This HTML code snippet contains a div element with nested divs styled with different border properties. The red divs are not displaying in the same horizontal row. What could be causing this issue and how can it be resolved to ensure that all red divs are ...

Ways to utilize a React custom hook that returns a value within the useEffect hook?

I'm dealing with a custom hook that returns a value based on the parameters it receives. In order to update this value dynamically, I attempted to use useEffect but encountered issues as the hook cannot be called within it. How can I work around this ...

Looking for assistance with CSS to properly align a dozen items

UPDATE: See the current layout in this JFiddle based on feedback received from others, still a few tweaks needed. In my setup, there are 12 divs housed within one container div. These 12 divs consist of 6 text components and 6 corresponding input fields. ...

Generating a hierarchical structure in Angular by converting a flat array into a Tree array

I am faced with the challenge of creating a tree Array that can be used in the primeng tree component. However, I am receiving a flat array from the backend. Here is an example of the data I receive: {name: 'teste', previousName: 'fathernam ...

Chrome does not support href while Edge does

href seems to be causing issues in Chrome, but it works fine on Microsoft Internet Explorer or Edge. It appears that the line (a href="....html")Something(/a) is not functioning properly on edge or safari. It behaves like a dropdown menu. There is a sig ...

Is there a way for me to keep the right-to-left text flowing into the section below it

I have come across a particularly lengthy Right-to-left arabic paragraph: https://fiddle.jshell.net/09b6xoaa/4/ My expectation is that when the line becomes too long, it should continue on the left side below ("end of the line this should be on the secon ...

What are some solutions for resolving differences in the display of pseudo elements between Macbooks and Windows desktops?

Greetings! I successfully converted an XD file to HTML and CSS code. I tested it on my Windows PC, but I haven't had the chance to test it on a Macbook yet. Details: I implemented a button with a pseudo element to show a right arrow on the right side ...