CKTIS / CSS
CSS-Eigenschaft `outline-width`
`outline-width` setzt die Liniendicke der Kontur einer sichtbaren Kontur außerhalb des Rahmens.
Version: CSS modules; captured CSSWG editor index includes draft and obsolete features requiring review
Syntax
<line-width>outline-width setzt die Liniendicke der Kontur einer sichtbaren Kontur außerhalb des Rahmens.
Das Beispiel erzeugt eine kontrastreiche solid-Kontur mit positiver Dicke, setzt die geprüfte Komponente und meldet die gesamte berechnete Kontur.
Grammatik: <line-width>.
Eine Kontur ändert keine Layoutmaße und kann Nachbarn überdecken; bei outline-style:none erzeugt eine Breite keine sichtbare Malung.
Beispiele
<!doctype html><html lang="en"><meta charset="utf-8"><title>CKTIS CSS example</title><body><pre id="result"></pre><script>const x=document.createElement("button");document.body.prepend(x);x.textContent="focus";x.style.cssText="width:80px;height:40px;outline:4px solid rgb(0 0 0)";const before=x.getBoundingClientRect();x.style.setProperty("outline-width","6px");const after=x.getBoundingClientRect(),s=getComputedStyle(x);document.querySelector("#result").textContent="outline="+s.outlineWidth+" "+s.outlineStyle+" "+s.outlineColor+"; offset="+s.outlineOffset+"; layout="+Math.round(before.width)+"x"+Math.round(before.height)+"->"+Math.round(after.width)+"x"+Math.round(after.height);</script></body></html>Ergebnis
outline=6px solid rgb(0, 0, 0); offset=0px; layout=80x40->80x40
Das Beispiel lief lokal in einer isolierten Chrome-Sitzung ohne Netzwerk; das Ergebnis stammt aus der CSS-API des Browsers.