CSS Anahattı
Anahat, öğenin sınırının dışına çizilen bir çizgidir.
CSS Anahattı
Anahat, öğeyi "ön plana çıkarmak" için, sınırların DIŞINDA, öğelerin etrafına çizilen bir çizgidir.
CSS, aşağıdaki anahat özelliklerine sahiptir:
-
outline-style
-
outline-color
-
outline-width
-
outline-offset
-
outline
Not: Anahat, sınırlardan farklıdır ! Kenarlığın aksine, anahat öğenin sınırının dışına çizilir ve diğer içerikle çakışabilir. Ayrıca ana hat, öğenin boyutlarının bir parçası DEĞİLDİR; öğenin toplam genişliği ve yüksekliği, anahattın genişliğinden etkilenmez.
CSS Anahat Stili
Özellik outline-style
, anahat stilini belirtir ve aşağıdaki değerlerden birine sahip olabilir:
dotted
- Noktalı bir anahat tanımlardashed
- Kesikli bir anahat tanımlarsolid
- Sağlam bir anahat tanımlardouble
- Çift anahat tanımlargroove
- Defines a 3D grooved outlineridge
- Defines a 3D ridged outlineinset
- Defines a 3D inset outlineoutset
- Defines a 3D outset outlinenone
- Defines no outlinehidden
- Defines a hidden outline
The following example shows the different outline-style
values:
Example
Demonstration of the different outline styles:
p.dotted {outline-style: dotted;}
p.dashed {outline-style: dashed;}
p.solid {outline-style: solid;}
p.double {outline-style: double;}
p.groove {outline-style: groove;}
p.ridge {outline-style: ridge;}
p.inset {outline-style: inset;}
p.outset {outline-style: outset;}
Result:
A dotted outline.
A dashed outline.
A solid outline.
A double outline.
A groove outline. The effect depends on the outline-color value.
A ridge outline. The effect depends on the outline-color value.
An inset outline. The effect depends on the outline-color value.
An outset outline. The effect depends on the outline-color value.
Note: None of the other outline properties (which you will learn more about in the next chapters) will have ANY effect unless the
outline-style
property is set!