Make image inside slanted div normal


Muhammad

As in the question below. I'm trying to make content, in this case it's an image inside a div that should be skewed. In other words, the div should be skewed and the image inside should not be skewed.

I am using:

-ms-transform: skew(-15deg, 0deg);
-webkit-transform: skew(-15deg, 0deg);
transform: skew(-15deg, 0deg);
evil spirits

Just add the opposite value for the child. So add the following to the image:

/* positive 15deg */
-ms-transform: skew(15deg, 0deg);
-webkit-transform: skew(15deg, 0deg);
transform: skew(15deg, 0deg);

edit:

Here is a working demo .

Related


How can I make the image "normal" in a slanted div?

Wiski So I want to make a diamond with an image, but the image is distorted. I am going to make it level (normal) and fill with diamonds. code I wrote . .diamond { width: 300px; height: 300px; border: 3px solid white; outline: 2px solid black; outlin

How can I make the image "normal" in a slanted div?

Wiski So I want to make a diamond with an image, but the image is distorted. I am going to make it level (normal) and fill with diamonds. code I wrote . .diamond { width: 300px; height: 300px; border: 3px solid white; outline: 2px solid black; outlin

How can I make the image "normal" in a slanted div?

Wiski So I want to make a diamond with an image, but the image is distorted. I am going to make it level (normal) and fill with diamonds. code I wrote . .diamond { width: 300px; height: 300px; border: 3px solid white; outline: 2px solid black; outlin

How can I make the image "normal" in a slanted div?

Wiski So I want to make a diamond with an image, but the image is distorted. I am going to make it level (normal) and fill with diamonds. code I wrote . .diamond { width: 300px; height: 300px; border: 3px solid white; outline: 2px solid black; outlin

How can I make the image "normal" in a slanted div?

Wiski So I want to make a diamond with an image, but the image is distorted. I am going to make it level (normal) and fill with diamonds. code I wrote . .diamond { width: 300px; height: 300px; border: 3px solid white; outline: 2px solid black; outlin

How can I make the image "normal" in a slanted div?

Wiski So I want to make a diamond with an image, but the image is distorted. I am going to make it level (normal) and fill with diamonds. code I wrote . .diamond { width: 300px; height: 300px; border: 3px solid white; outline: 2px solid black; outlin

Make slanted elements on an image transparent

Benjamin Treadwell I've tried following the guide on Youtube for help and I can get it to work - kinda. I'm trying to place two divs in a section where the top is to place the image and the bottom is to place the text etc. What I want is a slanted razor blade

slanted div contains normal text in scs

Mr. Bier I am trying to do something like this My best bet so far is header { border-radius: 0 0 0 100px; transform: skewX(15deg) skewY(10deg); background: #284C5C; position: relative; //left: 80px; //top: -80px; height: 400px; } h1 { transf

slanted div contains normal text in scs

Mr. Bier I am trying to do something like this My best bet so far is header { border-radius: 0 0 0 100px; transform: skewX(15deg) skewY(10deg); background: #284C5C; position: relative; //left: 80px; //top: -80px; height: 400px; } h1 { transf

slanted div contains normal text in scs

Mr. Bier I am trying to do something like this My best bet so far is header { border-radius: 0 0 0 100px; transform: skewX(15deg) skewY(10deg); background: #284C5C; position: relative; //left: 80px; //top: -80px; height: 400px; } h1 { transf

slanted div contains normal text in scs

Mr. Bier I am trying to do something like this My best bet so far is header { border-radius: 0 0 0 100px; transform: skewX(15deg) skewY(10deg); background: #284C5C; position: relative; //left: 80px; //top: -80px; height: 400px; } h1 { transf

slanted div contains normal text in scs

Mr. Bier I am trying to do something like this My best bet so far is header { border-radius: 0 0 0 100px; transform: skewX(15deg) skewY(10deg); background: #284C5C; position: relative; //left: 80px; //top: -80px; height: 400px; } h1 { transf

How to make an image pop up inside a div

Bobby Rock I have a div that contains images and when I hover over them I want them to pop up, but they only pop up inside the div, but I want them to pop up on the website. As you can see in the screenshot, the image is not visible after hovering over it. Doe

Vertically align a div and make it fit inside an image

Sam I want to create a very simple image viewer. When a thumbnail is clicked, a large version of that thumbnail should open on a black background with an opacity of 0.8. That photo... Must not exceed 80% of the window height. Must not exceed 80% of the window

How to make an image pop up inside a div

Bobby Rock I have a div that contains images and when I hover over them I want them to pop up, but they only pop up inside the div, but I want them to pop up on the website. As you can see in the screenshot, the image is not visible after hovering over it. Doe

How to make an image pop up inside a div

Bobby Rock I have a div that contains images and when I hover over them I want them to pop up, but they only pop up inside the div, but I want them to pop up on the website. As you can see in the screenshot, the image is not visible after hovering over it. Doe

How to make an image pop up inside a div

Bobby Rock I have a div that contains images and when I hover over them I want them to pop up, but they only pop up inside the div, but I want them to pop up on the website. As you can see in the screenshot, the image is not visible after hovering over it. Doe

Vertically align a div and make it fit inside an image

Sam I want to create a very simple image viewer. When a thumbnail is clicked, a large version of that thumbnail should open on a black background with an opacity of 0.8. That photo... Must not exceed 80% of the window height. Must not exceed 80% of the window

How to make an image pop up inside a div

Bobby Rock I have a div that contains images and when I hover over them I want them to pop up, but they only pop up inside the div, but I want them to pop up on the website. As you can see in the screenshot, the image is not visible after hovering over it. Doe

How to make an image pop up inside a div

Bobby Rock I have a div that contains images and when I hover over them I want them to pop up, but they only pop up inside the div, but I want them to pop up on the website. As you can see in the screenshot, the image is not visible after hovering over it. Doe

How to make an image pop up inside a div

Bobby Rock I have a div that contains images and when I hover over them I want them to pop up, but they only pop up inside the div, but I want them to pop up on the website. As you can see in the screenshot, the image is not visible after hovering over it. Doe

How to create a slanted SVG image with slanted text

very cool I am trying to create a slanted image in svg with slanted text as shown in the image below I tried to create the same format but couldn't create the same design as the overall text display, you can also see the columns below attached horizontally dow

Left slanted image in css

magic beans I want an image, but I want it to stay slanted. Check out the image of what I mean: But my current situation is like this: Here is my code: <div class="col-lg-5 col-md-12 col-sm-12"> //SOMETHING HERE </div>

slanted div border transparency

Django Tango So I know how to use :after and borders to make slanted divs for modern layouts. However, I was wondering if you could use this to crop out part of the div with transparency? For example, let's say I have a row of cards with a background image, an

slanted div with border

Sheikh Kamran Ahmed I have this code with 6 slanted divs in it. What I want to do is to give only the center header 2 div a black border, but when I give it a border, it only shows the top and bottom. The left and right borders are not visible. .title { back