Can I put an element Image from 'next/image' in { position: absolute; left: 50% }
?
It seems that it is not affected.
Example:
import React from 'react'
import Image from 'next/image'
import styled from 'styled-components'
const Container = styled.div`
position: relative;
`
const Test = styled(Image)`
position: absolute;
left: 50%;
`
const Page: React.FC = () => {
return (
<Container>
<Test src{someImg.webp} width={500} height={500} objectFit="none" />
</Container>
)
}
export default Page;