From 4b1a9203c547c019fc5398082ae19a3f3d4c3efe Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:15 -0500 Subject: initial commit --- files/de/web/css/object-position/index.html | 147 ++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 files/de/web/css/object-position/index.html (limited to 'files/de/web/css/object-position') diff --git a/files/de/web/css/object-position/index.html b/files/de/web/css/object-position/index.html new file mode 100644 index 0000000000..e3b2dd4f80 --- /dev/null +++ b/files/de/web/css/object-position/index.html @@ -0,0 +1,147 @@ +--- +title: object-position +slug: Web/CSS/object-position +translation_of: Web/CSS/object-position +--- +
{{CSSRef}}
+ +

Die Eigenschaft object-position bestimmt  die Ausrichtung des Elements in seiner Box.

+ +
/* <position> Werte */
+object-position: 100px 50px;
+
+/* Globale Werte */
+object-position: inherit;
+object-position: initial;
+object-position: unset;
+
+ +

{{cssinfo}}

+ +

Syntax

+ +

Values

+ +
+
<position>
+
Is a {{ cssxref("<position>") }}, that is one to four values representing a 2D position regarding the edges of the element's box. Relative or absolute offsets can be given. Note that the position can be set outside of the element's box.
+
+ +

Formal syntax

+ +
{{csssyntax}}
+ +

Example

+ +

HTML content

+ +
<img id="object-position-1" src="https://mdn.mozillademos.org/files/12668/MDN.svg" alt="MDN Logo"/>
+<img id="object-position-2" src="https://mdn.mozillademos.org/files/12668/MDN.svg" alt="MDN Logo"/>
+
+ +

CSS content

+ +
img {
+   width: 300px;
+   height: 250px;
+   border: 1px solid black;
+   background-color: silver;
+   margin-right: 1em;
+   object-fit: none;
+}
+
+#object-position-1 {
+  object-position: 10px;
+}
+
+#object-position-2 {
+  object-position: 100% 10%;
+}
+
+ +

Output

+ +

{{ EmbedLiveSample('Example', '100%','300px') }}

+ +

Specifications

+ + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('CSS4 Images', '#the-object-position', 'object-position')}}{{Spec2('CSS4 Images')}}The from-image and flip keywords have been added.
{{SpecName('CSS3 Images', '#the-object-position', 'object-position')}}{{Spec2('CSS3 Images')}}Initial definition
+ +

Browser compatibility

+ +

{{ CompatibilityTable }}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support31.0{{ CompatGeckoDesktop("36") }}{{CompatNo}}11.60{{ property_prefix("-o") }}
+ 19.0
10.0
+
+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support4.4.4{{ CompatGeckoDesktop("36") }}{{CompatNo}}11.5{{ property_prefix("-o") }}
+ 24
{{ CompatNo }}
+
+[1] WebKit Nightly fixed in bug 122811.
+ +

See also

+ + -- cgit v1.2.3-54-g00ecf