Veturia filter
Veturia filter i vendos
imazhit të sfondit një stil të caktuar artistik
ose filtër. Veturia mund të marrë
si vlera emrat e stileve artistike, të formuara nga
funksioni filter ose none (anulim i
filtrit të zgjedhur).
Sintaksa
përzgjedhësi {
filter: stil artistik ose none;
}
Shembull
Le t'i vendosim imazhit tonë një filtër bardh e zi, dhe kur e kalojmi mausin mbi të, ta anulojmë atë:
<div id="elem"></div>
#elem {
filter: grayscale(100%);
background: url("bg.png") center / cover no-repeat;
width: 400px;
height: 300px;
border: 1px solid black;
}
#elem:hover {
filter: none;
}
:
Shihni gjithashtu
-
veturia
background,
e cila paraqet një veturi-shkurtim për sfondin -
funksioni
blur,
i cili zamazon sfondin -
funksioni
brightness,
i cili i vendos shkëlqimin sfondit -
funksioni
contrast,
i cili i vendos kontrastin sfondit -
funksioni
drop-shadow,
i cili i vendos hijen sfondit -
funksioni
hue-rotate,
i cili i vendos ngjyrën sfondit -
funksioni
invert,
i cili përmbys ngjyrat e sfondit -
funksioni
opacity,
i cili i vendos transparencën sfondit -
funksioni
sepia,
i cili e shndërron sfondin në sepi