--- title: '-webkit-text-stroke' slug: Web/CSS/-webkit-text-stroke tags: - CSS - Eigenschaft - Non-standard - Referenz translation_of: Web/CSS/-webkit-text-stroke --- <div>{{CSSRef}}{{Non-standard_header}}</div> <h2 id="Übersicht">Übersicht</h2> <p>Die <strong><code>-webkit-text-stroke</code></strong> <a href="/de/docs/Web/CSS">CSS</a> Eigenschaft gibt die <a href="/de/docs/Web/CSS/length">Breite</a> und <a href="/de/docs/Web/CSS/color_value">Farbe</a> der Umrandung von Textzeichen an. Sie ist eine Kurzschreibweise für die Langschreibungseigenschaften {{cssxref("-webkit-text-stroke-width")}} und {{cssxref("-webkit-text-stroke-color")}}.</p> <p>{{cssinfo}}</p> <h2 id="Syntax">Syntax</h2> <pre class="brush:css notranslate">/* Breiten- und Farbwerte */ -webkit-text-stroke: 4px navy; /* Globale Werte */ -webkit-text-stroke: inherit; -webkit-text-stroke: initial; -webkit-text-stroke: unset; </pre> <h3 id="Werte">Werte</h3> <dl> <dt><code><length></code></dt> <dd>Die Breite der Umrandung.</dd> <dt><code><color></code></dt> <dd>Die Farbe der Umrandung.</dd> </dl> <h3 id="Formale_Syntax">Formale Syntax</h3> {{csssyntax}} <h2 id="Beispiel">Beispiel</h2> <h3 id="HTML">HTML</h3> <pre class="brush: html notranslate"><p id="example">Die Umrandung dieses Texts ist rot.</p></pre> <h3 id="CSS">CSS</h3> <pre class="brush: css notranslate">#example { font-size: 50px; margin: 0; -webkit-text-stroke: 2px red; }</pre> <p>{{EmbedLiveSample("Beispiel", 650, 60)}}</p> <h2 id="Spezifikationen">Spezifikationen</h2> <p>Nicht Teil einer Spezifikation.</p> <p>Apple hat eine <a href="https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariCSSRef/Articles/StandardCSSProperties.html#//apple_ref/doc/uid/TP30001266-_webkit_text_stroke">Beschreibung in der Safari CSS Referenz</a>.</p> <h2 id="Browser_Kompatibilität">Browser Kompatibilität</h2> <p>{{CompatibilityTable}}</p> <div id="compat-desktop"> <table class="compat-table"> <tbody> <tr> <th>Merkmal</th> <th>Chrome</th> <th>Firefox (Gecko)</th> <th>Internet Explorer</th> <th>Opera</th> <th>Safari</th> </tr> <tr> <td>Grundlegende Unterstützung</td> <td>4</td> <td>{{CompatGeckoDesktop("48.0")}}<sup>[1]</sup></td> <td>{{CompatNo}}</td> <td>15</td> <td>3.1</td> </tr> </tbody> </table> </div> <div id="compat-mobile"> <table class="compat-table"> <tbody> <tr> <th>Merkmal</th> <th>Android</th> <th>Firefox Mobile (Gecko)</th> <th>IE Mobile</th> <th>Opera Mobile</th> <th>Safari Mobile</th> </tr> <tr> <td>Grundlegende Unterstützung</td> <td>4</td> <td>{{CompatGeckoMobile("48.0")}}<sup>[1]</sup></td> <td>{{CompatNo}}</td> <td>36</td> <td>4.1</td> </tr> </tbody> </table> </div> <p>[1] Ab Gecko 48 hinter der Einstellung <code>layout.css.prefixes.webkit</code> implementiert, dort noch standarmäßig <code>false</code>;<br> ab Gecko 49 {{geckoRelease("49.0")}} standardmäßig <code>true</code>.</p> <h2 id="Siehe_auch">Siehe auch</h2> <ul> <li><a href="https://www.webkit.org/blog/85/introducing-text-stroke/">Surfin' Safari Blogeintrag, der dieses Feature ankündigt</a></li> <li><a href="https://css-tricks.com/adding-stroke-to-web-text/">CSS-Tricks Artikel, der dieses Feature erklärt</a></li> <li>{{cssxref("-webkit-text-stroke-width")}}</li> <li>{{cssxref("-webkit-text-stroke-color")}}</li> <li>{{cssxref("-webkit-text-fill-color")}}</li> </ul>