Questions tagged [object-position]

object-position css property

The object-position CSS property specifies the alignment of the selected replaced element's contents within the element's box. Areas of the box which aren't covered by the replaced element's object will show the element's background.

You can adjust how the replaced element's object's intrinsic size (that is, its natural size) is adjusted to fit within the element's box using the object-fit property.

4 questions
1
vote
1 answer

CSS animation triggered by a CSS value change

A CSS transition can be used to trigger an animation of a CSS property when said property changes. A CSS animation can be used to animate multiple properties at the same time. Is there a way to combine these, so that when some CSS property changes,…
Cactus
  • 27,075
  • 9
  • 69
  • 149
1
vote
1 answer

Resizing clipped part of the image with CSS

I am trying to figure out, if there is any way to resize the clipped part of the image with use of css. In the most expected version, image resized this way should keep the imposed aspect ratio. I was playing with clip-path, trying both approaches…
dra89szka
  • 103
  • 1
  • 11
0
votes
1 answer

How to reposition image in ImageBackground React Native?

I have a big image that I'm using in the React Native ImageBackground component. function Component(){ return ; } The size is correct, but I would like to reposition the image…
0
votes
0 answers

Is there a way to target an img tag object-position x and y?

I have included my codepen for an example. I need to have the image move around with cursor. Is there an attribute like object-position Y or something that i can use? I know i could do background-position x or y , but why not object-position X or…
lache
  • 608
  • 2
  • 12
  • 29