CSS object-position প্রতিশব্দ
- পূর্ববর্তী পৃষ্ঠা object-fit
- পরবর্তী পৃষ্ঠা offset
elective course
course recommendation:
definition and usage
see also:CSS tutorial:
CSS object-fitCSS reference manual:
CSS object-positionHTML DOM reference manual:
objectPosition attribute
example
adjust the size of the image to fit its content box, and move the image 5px from the left and 10% from the top inside the content box: img.a { width: 200px; height: 400px; object-fit: none; object-position: 5px 10%; border: 5px solid red;
try it yourself
CSS syntax descriptionobject-position:
|initial|inherit;
attribute value | value |
---|---|
description |
position specifies the position of the image or video within its content box. the first value controls the x-axis, the second value controls the y-axis. |
set this property to its default value. See | it can be a string (left, center or right) or a number (in px or %). Negative values are allowed. set this property to its default value. Seeanimation-related properties |
from its parent element. See | initial from its parent element. Seeanimation-related properties |
inherit
technical details | default value: |
---|---|
50% 50% | inheritance: |
yes | animation production:supported. See:animation-related properties |
。 | সংস্করণ: |
CSS3 | JavaScript 语法: |
ব্রাউজার সমর্থন
টেবিলের সংখ্যা এই বৈশিষ্ট্যটি যে প্রথম ব্রাউজারটির সাথে সম্পূর্ণরূপে সমর্থিত বলে নির্দেশ করে。
Chrome | IE / Edge | Firefox | Safari | Opera |
---|---|---|---|---|
31.0 | 16.0 | 36.0 | 10.0 | 19.0 |
- পূর্ববর্তী পৃষ্ঠা object-fit
- পরবর্তী পৃষ্ঠা offset