ﺪﯿﻫﺩ ﺭﺍﺮﻗ ﻥﺁ ﯼﻭﺭ ﺎﺗ ﺪﯿﻨﮐ ﯽﻣ ﺩﺎﺠﯾﺍ ﮏﺳﺎﻣ ﻪﯾﻻ ﮏﯾ CSS ﮏﺳﺎﻣ ﺎﺑ
ﺪﻨﮐ ﯽﻣ ﺺﺨﺸﻣ ﺍﺭ ﮏﺳﺎﻣ ﮏﯾ
ﺪﺷﺎﺑ ﺮﯾﻮﺼﺗ ﮏﯾ ﺎﯾ CSS ﻥﺎﯾﺩﺍﺮﮔ ﮏﯾ ،SVG ﺮﯾﻮﺼﺗ ﮏﯾ ،PNG ﺮﯾﻮﺼﺗ ﮏﯾ ﺪﻧﺍﻮﺗ ﯽﻣ ﮏﺳﺎﻣ ﻪﯾﻻ
ﻪﺟﻮﺗ: ﺯﺍ ﻂﻘﻓ ﺎﻫﺮﮔﺭﻭﺮﻣ ﺮﺜﮐﺍ CSS ﺪﻧﺭﺍﺩ ﯽﺋﺰﺟ ﯽﻧﺎﺒﯿﺘﺸﭘ
.ﺪﻨﮐ ﯽﻣ ﺺﺨﺸﻣ ﺍﺭ ﺩﺮﮐ ﯽﻣ ﺭﺎﮐ ﺪﻧﻮﺸﯿﭘ ﺎﺑ ﻪﮐ ﺍﺭ ﯼﺍ ﻪﺨﺴﻧ ﻦﯿﻟﻭﺍ -webkit- ﻝﺎﺒﻧﺩ ﻪﺑ ﺩﺍﺪ
| Property | |||||
|---|---|---|---|---|---|
| mask-image | 4.0 -webkit- | 79.0 -webkit- | 53.0 | 4.0 -webkit- | 15.0 -webkit- |
.ﺪﯿﻨﮐ ﻩﺩﺎﻔﺘﺳﺍ ﮏﺳﺎﻣ ﺭﺩ ﺭﻮﺒﻋ ﯼﺍﺮﺑ url() ﺭﺍﺪﻘﻣ ﮏﯾ ﺯﺍ ،ﮏﺳﺎﻣ ﻪﯾﻻ ﻥﺍﻮﻨﻋ ﻪﺑ SVG ﺎﯾ PN
ﯽﮑﺸﻣ .ﺪﺷﺎﺑ ﻪﺘﺷﺍﺩ ﻑﺎﻔﺷ ﻪﻤﯿﻧ ﺎﯾ ﻑﺎﻔﺷ ﻪﯿﺣﺎﻧ ﮏﯾ ﺪﯾﺎﺑ ﮏﺳﺎﻣ ﺮﯾﻮﺼﺗ
:ﺩﺮﮐ ﻢﯿﻫﺍﻮﺧ ﻩﺩﺎﻔﺘﺳﺍ ﺎﻣ ﻪﮐ ﺖﺳﺍ (PNG ﺮﯾﻮﺼﺗ ﮏﯾ) ﮏﺳﺎﻣ ﺮﯾﻮﺼﺗ ﺎﺠﻨﯾﺍ ﺭﺩ
:ﺖﺳﺍ ﻩﺪﻣﺁ ﺎﯿﻟﺎﺘﯾﺍ ﺭﺩ Cinque Terre ﺯﺍ ﯼﺮﯾﻮﺼﺗ ﺎﺠﻨﯾﺍ ﺭﺩ
:ﻢﯿﻨﮐ ﯽﻣ ﻝﺎﻤﻋﺍ ﺎﯿﻟﺎﺘﯾﺍ ،Cinque Terre ﺯﺍ ﺮﯾﻮﺼﺗ ﯼﺍﺮﺑ ﮏﺳﺎﻣ ﻪﯾﻻ ﻥﺍﻮﻨﻋ ﻪﺑ ﺍﺭ (ﻻﺎﺑ P
:ﺖﺳﺍ ﻊﺒﻨﻣ ﺪﮐ ﻦﯾﺍ
.mask1 {
-webkit-mask-image: url(w3logo.png);
mask-image:
url(w3logo.png);
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
}→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<head>
<style>
.mask1 {
-webkit-mask-image: url(w3logo.png);
mask-image: url(w3logo.png);
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
}
</style>
</head>
<body>
<h1>The mask-image Property</h1>
<h3>An image with a mask layer image:</h3>
<div class="mask1">
<img src="img_5terre.jpg" alt="Cinque Terre" width="600" height="400">
</div>
<h3>Original image:</h3>
<img src="img_5terre.jpg" alt="Cinque Terre" width="600" height="400">
</body>
</html>
ﺪﻨﮐ ﯽﻣ ﺺﺨﺸﻣ ﺍﺭ ﺮﯾﻮﺼﺗ mask-image ﯽﮔﮋﯾﻭ
ﻪﻧﻮﮕﭼ ﺎﯾ ﺎﯾﺁ ﻪﮐ ﺪﻨﮐ ﯽﻣ ﺺﺨﺸﻣ mask-repeat ﯽﮔﮋﯾﻭ
:ﺪﺷ ﺪﻫﺍﻮﺧ ﺭﺍﺮﮑﺗ ﺎﯿﻟﺎﺘﯾﺍ ،Cinque Terre ﺯﺍ ﺮﯾﻮﺼﺗ ﺮﺳﺍﺮﺳ ﺭﺩ ﮏﺳﺎﻣ ﺮﯾﻮﺼﺗ ،ﻢﯿﻨﮐ ﻑﺬﺣ ﺍ
:ﺖﺳﺍ ﻊﺒﻨﻣ ﺪﮐ ﻦﯾﺍ
.mask1 {
-webkit-mask-image: url(w3logo.png);
mask-image:
url(w3logo.png);
}→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<head>
<style>
.mask1 {
-webkit-mask-image: url(w3logo.png);
mask-image: url(w3logo.png);
}
</style>
</head>
<body>
<h1>The mask-image Property</h1>
<h3>An image with a mask layer image:</h3>
<div class="mask1">
<img src="img_5terre.jpg" alt="Cinque Terre" width="600" height="400">
</div>
<h3>Original image:</h3>
<img src="img_5terre.jpg" alt="Cinque Terre" width="600" height="400">
</body>
</html>
.ﺩﻮﺷ ﻩﺩﺎﻔﺘﺳﺍ ﮏﺳﺎﻣ ﺮﯾﻭﺎﺼﺗ ﻥﺍﻮﻨﻋ ﻪﺑ ﺪﻧﺍﻮﺗ ﯽﻣ ﺰﯿﻧ CSS ﯽﻋﺎﻌﺷ ﻭ ﯽﻄﺧ ﺐﯿﺷ
:ﺩﻭﺭ ﯽﻣ (ﻑﺎﻔﺷ) ﻦﯿﯾﺎﭘ ﻪﺑ (ﻩﺎﯿﺳ) ﻻﺎﺑ ﺯﺍ ﯽﻄﺧ ﻥﺎﯾﺩﺍﺮﮔ ﻦﯾﺍ .ﻢﯿﻨﮐ ﯽﻣ ﻩﺩﺎﻔﺘﺳﺍ ﺩﻮﺧ ﺮﯾﻮ

:ﺪﯿﻨﮐ ﻩﺩﺎﻔﺘﺳﺍ ﮏﺳﺎﻣ ﻪﯾﻻ ﻥﺍﻮﻨﻋ ﻪﺑ ﯽﻄﺧ ﻥﺎﯾﺩﺍﺮﮔ ﮏﯾ ﺯﺍ
.mask1 {
-webkit-mask-image: linear-gradient(black, transparent);
mask-image: linear-gradient(black,
transparent);
}→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<head>
<style>
.mask1 {
-webkit-mask-image: linear-gradient(black, transparent);
mask-image: linear-gradient(black, transparent);
}
</style>
</head>
<body>
<h1>The mask-image Property</h1>
<h3>A linear gradient as a mask layer:</h3>
<div class="mask1">
<img src="img_5terre.jpg" alt="Cinque Terre" width="600" height="400">
</div>
<h3>Original image:</h3>
<img src="img_5terre.jpg" alt="Cinque Terre" width="600" height="400">
</body>
</html>
:ﻢﯿﻨﮐ ﯽﻣ ﻩﺩﺎﻔﺘﺳﺍ ﺩﻮﺧ ﺮﯾﻮﺼﺗ ﯼﺍﺮﺑ ﮏﺳﺎﻣ ﻪﯾﻻ ﻥﺍﻮﻨﻋ ﻪﺑ ﻦﺘﻣ ﻥﺪﻧﺎﺷﻮﭘ ﺎﺑ ﻩﺍﺮﻤﻫ ﯽﻄﺧ ﻥﺎﯾ
The Cinque Terre is a coastal area within Liguria, in the northwest of Italy. It lies in the west of La Spezia Province, and comprises five villages: Monterosso al Mare, Vernazza, Corniglia, Manarola, and Riomaggiore.
The Cinque Terre is a coastal area within Liguria, in the northwest of Italy. It lies in the west of La Spezia Province, and comprises five villages: Monterosso al Mare, Vernazza, Corniglia, Manarola, and Riomaggiore.
The Cinque Terre is a coastal area within Liguria, in the northwest of Italy. It lies in the west of La Spezia Province, and comprises five villages: Monterosso al Mare, Vernazza, Corniglia, Manarola, and Riomaggiore.
:ﺪﯿﻨﮐ ﻩﺩﺎﻔﺘﺳﺍ ﮏﺳﺎﻣ ﻪﯾﻻ ﻥﺍﻮﻨﻋ ﻪﺑ ﻦﺘﻣ ﻥﺪﻧﺎﺷﻮﭘ ﺎﺑ ﻩﺍﺮﻤﻫ ﯽﻄﺧ ﻥﺎﯾﺩﺍﺮﮔ ﮏﯾ ﺯﺍ
.mask1 {
max-width: 600px;
height: 350px;
overflow-y: scroll;
background: url(img_5terre.jpg) no-repeat;
-webkit-mask-image: linear-gradient(black, transparent);
mask-image: linear-gradient (black, transparent);
}→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<head>
<style>
p {
font-size: 20px;
padding: 20px;
color: white;
}
.mask1 {
max-width: 600px;
height: 350px;
overflow-y: scroll;
background: url(img_5terre.jpg) no-repeat;
-webkit-mask-image: linear-gradient(black, transparent);
mask-image: linear-gradient (black, transparent);
}
</style>
</head>
<body>
<h1>The mask-image Property</h1>
<h3>A linear gradient as a mask layer:</h3>
<div class="mask1">
<p>The Cinque Terre is a coastal area within Liguria, in the northwest of Italy. It lies in the west of La Spezia Province, and comprises five villages: Monterosso al Mare, Vernazza, Corniglia, Manarola, and Riomaggiore.</p>
<p>The Cinque Terre is a coastal area within Liguria, in the northwest of Italy. It lies in the west of La Spezia Province, and comprises five villages: Monterosso al Mare, Vernazza, Corniglia, Manarola, and Riomaggiore.</p>
<p>The Cinque Terre is a coastal area within Liguria, in the northwest of Italy. It lies in the west of La Spezia Province, and comprises five villages: Monterosso al Mare, Vernazza, Corniglia, Manarola, and Riomaggiore.</p>
</div>
</body>
</html>
:ﻢﯿﻨﮐ ﯽﻣ ﻩﺩﺎﻔﺘﺳﺍ ﺩﻮﺧ ﺮﯾﻮﺼﺗ ﯼﺍﺮﺑ ﮏﺳﺎﻣ ﻪﯾﻻ ﻥﺍﻮﻨﻋ ﻪﺑ (ﻩﺮﯾﺍﺩ ﻞﮑﺷ ﻪﺑ) ﯽﻋﺎﻌﺷ ﻥﺎﯾﺩﺍﺮﮔ
:ﺪﯿﻨﮐ ﻩﺩﺎﻔﺘﺳﺍ (ﻩﺮﯾﺍﺩ ﮏﯾ) ﮏﺳﺎﻣ ﻪﯾﻻ ﻥﺍﻮﻨﻋ ﻪﺑ ﯽﻋﺎﻌﺷ ﻥﺎﯾﺩﺍﺮﮔ ﮏﯾ ﺯﺍ
.mask2 {
-webkit-mask-image:
radial-gradient(circle, black 50%, rgba(0, 0, 0, 0.5) 50%);
mask-image: radial-gradient(circle, black 50%, rgba(0, 0, 0, 0.5) 50%);
}→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<head>
<style>
.mask2 {
-webkit-mask-image: radial-gradient(circle, black 50%, rgba(0, 0, 0, 0.5) 50%);
mask-image: radial-gradient(circle, black 50%, rgba(0, 0, 0, 0.5) 50%);
}
</style>
</head>
<body>
<h1>The mask-image Property</h1>
<h3>A radial gradient as a mask layer (a circle):</h3>
<div class="mask2">
<img src="img_5terre.jpg" alt="Cinque Terre" width="600" height="400">
</div>
<h3>Original image:</h3>
<img src="img_5terre.jpg" alt="Cinque Terre" width="600" height="400">
</body>
</html>
:ﻢﯿﻨﮐ ﯽﻣ ﻩﺩﺎﻔﺘﺳﺍ ﺩﻮﺧ ﺮﯾﻮﺼﺗ ﯼﺍﺮﺑ ﮏﺳﺎﻣ ﻪﯾﻻ ﻥﺍﻮﻨﻋ ﻪﺑ (ﯽﻀﯿﺑ ﻞﮑﺷ ﻪﺑ) ﯽﻋﺎﻌﺷ ﻥﺎﯾﺩﺍﺮﮔ
:ﺪﯿﻨﮐ ﻩﺩﺎﻔﺘﺳﺍ (ﯽﻀﯿﺑ) ﮏﺳﺎﻣ ﻪﯾﻻ ﻥﺍﻮﻨﻋ ﻪﺑ ﺮﮕﯾﺩ ﯽﻋﺎﻌﺷ ﻥﺎﯾﺩﺍﺮﮔ ﮏﯾ ﺯﺍ
.mask3 {
-webkit-mask-image: radial-gradient(ellipse, black 50%, rgba(0,
0, 0, 0.5) 50%);
mask-image: radial-gradient(ellipse, black 50%, rgba(0, 0,
0, 0.5) 50%);
}→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<head>
<style>
.mask3 {
-webkit-mask-image: radial-gradient(ellipse, black 50%, rgba(0, 0, 0, 0.5) 50%);
mask-image: radial-gradient(ellipse, black 50%, rgba(0, 0, 0, 0.5) 50%);
}
</style>
</head>
<body>
<h1>The mask-image Property</h1>
<h3>A radial gradient as a mask layer (an ellipse):</h3>
<div class="mask3">
<img src="img_5terre.jpg" alt="Cinque Terre" width="600" height="400">
</div>
<h3>Original image:</h3>
<img src="img_5terre.jpg" alt="Cinque Terre" width="600" height="400">
</body>
</html>
ﮏﯾ ﻞﺧﺍﺩ ﺭﺩ ﻥﺍﻮﺗ ﯽﻣ ﺍﺭ
:ﻢﯿﻨﮐﯽﻣ ﻩﺩﺎﻔﺘﺳﺍ ﺩﻮﺧ ﺮﯾﻮﺼﺗ ﯼﺍﺮﺑ ﻒﻠﺘﺨﻣ ﮏﺳﺎﻣ ﯼﺎﻫﻪﯾﻻ ﺩﺎﺠﯾﺍ ﯼﺍﺮﺑ