banner



How To Darken Black Skin

How to darken an Image using CSS ?

Method 1: Using the filter holding: The filter property is used to apply various graphical effects to an element. The brightness() function can be used as a value to apply a linear multiplier to make it appear darker or lighter than the original. To make an image darker, any value below 100% could be used to darken the prototype by that percentage.

Syntax:

filter: brightness(fifty%)

Example:

<!DOCTYPE html>

< html >

< head >

< championship >

How to Darken an Image

using CSS?

</ title >

< way >

.darkened-image {

filter: brightness(50%);

groundwork-image: url(

height: 94px;

width: 120px;

}

</ style >

</ head >

< trunk >

< h1 mode = "color: green" >

GeeksForGeeks

</ h1 >

< b >

How to Darken an Prototype

with CSS?

</ b >

< p >

The image below is the

normal prototype:

</ p >

< img src =

< p >

The paradigm below is the

darkened image:

</ p >

< div class = "darkened-image" ></ div >

</ body >

</ html >

Output:
using-filter

Method 2: Using the background-image property with a linear gradient: The groundwork-epitome holding in CSS supports the apply of multiple backgrounds that are layered on top of each other. Using the linear-gradient holding, a black colored background is used every bit the front layer and the image to be darkened is used as the back layer. The order of the background-image holding specifies the front layer to be specified kickoff earlier defining the layers at the dorsum.
The opacity of the blackness gradient can be changed to control the amount of darkening. This can be used accordingly to darken the prototype as required.

Syntax:

groundwork-image: linear-gradient(rgba(0, 0, 0, 0.five),                        rgba(0, 0, 0, 0.v)), url("url_of_image"))

Example: Using an opacity of 0.five of the groundwork gradient to darken the image.

<!DOCTYPE html>

< html >

< caput >

< title >

How to Darken an Epitome with CSS?

</ title >

< fashion >

.darkened-image {

background-epitome:

linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),

url(

height: 94px;

width: 120px;

}

</ style >

</ caput >

< body >

< h1 style = "color: dark-green" >

GeeksForGeeks

</ h1 >

< b >

How to Darken an Image

with CSS?

</ b >

< p >

The prototype below is the

normal paradigm:

</ p >

< img src =

< p >

The epitome below is the

darkened image:

</ p >

< div class = "darkened-epitome" ></ div >

</ torso >

</ html >

Output:
using-multiple-bg

CSS is the foundation of webpages, is used for webpage development by styling websites and spider web apps.Y'all tin can learn CSS from the ground up by following this CSS Tutorial and CSS Examples.


Source: https://www.geeksforgeeks.org/how-to-darken-an-image-using-css/

Posted by: wilsonwhishatim.blogspot.com

0 Response to "How To Darken Black Skin"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel