Egenskaben outline-width
angiver bredden af omridset, og kan have en af følgende værdier:
tynd
(typisk 1px)
medium
(typisk 3px)
tyk
(typisk 5px)
En bestemt størrelse (i px, pt, cm, em osv.)
Følgende eksempel viser nogle konturer med forskellige bredder:
A thin outline.
A medium outline.
A thick outline.
A 4px thick outline.
p.ex1
{
border: 1px solid black;
outline-style: solid;
outline-color: red;
outline-width: thin;
}
p.ex2
{
border: 1px solid black;
outline-style: solid;
outline-color: red;
outline-width: medium;
}
p.ex3
{
border: 1px solid black;
outline-style: solid;
outline-color: red;
outline-width: thick;
}
p.ex4
{
border: 1px solid black;
outline-style: solid;
outline-color: red;
outline-width: 4px;
}
Prøv det selv →
<!DOCTYPE html>
<html>
<head>
<style>
p.ex1 {
border: 1px solid black;
outline-style: solid;
outline-color: red;
outline-width: thin;
}
p.ex2 {
border: 1px solid black;
outline-style: solid;
outline-color: red;
outline-width: medium;
}
p.ex3 {
border: 1px solid black;
outline-style: solid;
outline-color: red;
outline-width: thick;
}
p.ex4 {
border: 1px solid black;
outline-style: solid;
outline-color: red;
outline-width: 4px;
}
</style>
</head>
<body>
<h2>The outline-width Property</h2>
<p class="ex1">A thin outline.</p>
<p class="ex2">A medium outline.</p>
<p class="ex3">A thick outline.</p>
<p class="ex4">A 4px thick outline.</p>
</body>
</html>