ﺪﯿﻫﺩ ﺭﺍﺮﻗ ﻥﺁ ﯼﻭﺭ ﺎﺗ ﺪﯿﻨﮐ ﯽﻣ ﺩﺎﺠﯾﺍ ﮏﺳﺎﻣ ﻪﯾﻻ ﮏﯾ CSS ﮏﺳﺎﻣ ﺎﺑ
ﺪﻨﮐ ﯽﻣ ﺺﺨﺸﻣ ﺍﺭ ﮏﺳﺎﻣ ﮏﯾ ﺪﺷﺎﺑ ﺮﯾﻮﺼﺗ ﮏﯾ ﺎﯾ CSS ﻥﺎﯾﺩﺍﺮﮔ ﮏﯾ ،SVG ﺮﯾﻮﺼﺗ ﮏﯾ ،PNG ﺮﯾﻮﺼﺗ ﮏﯾ ﺪﻧﺍﻮﺗ ﯽﻣ ﮏﺳﺎﻣ ﻪﯾﻻ ﻪﺟﻮﺗ: ﺯﺍ ﻂﻘﻓ ﺎﻫﺮﮔﺭﻭﺮﻣ ﺮﺜﮐﺍ CSS ﺪﻧﺭﺍﺩ ﯽﺋﺰﺟ ﯽﻧﺎﺒﯿﺘﺸﭘ .ﺪﻨﮐ ﯽﻣ ﺺﺨﺸﻣ ﺍﺭ ﺩﺮﮐ ﯽﻣ ﺭﺎﮐ ﺪﻧﻮﺸﯿﭘ ﺎﺑ ﻪﮐ ﺍﺭ ﯼﺍ ﻪﺨﺴﻧ ﻦﯿﻟﻭﺍ -webkit- ﻝﺎﺒﻧﺩ ﻪﺑ ﺩﺍﺪ .ﺪﯿﻨﮐ ﻩﺩﺎﻔﺘﺳﺍ ﮏﺳﺎﻣ ﺭﺩ ﺭﻮﺒﻋ ﯼﺍﺮﺑ url() ﺭﺍﺪﻘﻣ ﮏﯾ ﺯﺍ ،ﮏﺳﺎﻣ ﻪﯾﻻ ﻥﺍﻮﻨﻋ ﻪﺑ SVG ﺎﯾ PN ﯽﮑﺸﻣ .ﺪﺷﺎﺑ ﻪﺘﺷﺍﺩ ﻑﺎﻔﺷ ﻪﻤﯿﻧ ﺎﯾ ﻑﺎﻔﺷ ﻪﯿﺣﺎﻧ ﮏﯾ ﺪﯾﺎﺑ ﮏﺳﺎﻣ ﺮﯾﻮﺼﺗ :ﺩﺮﮐ ﻢﯿﻫﺍﻮﺧ ﻩﺩﺎﻔﺘﺳﺍ ﺎﻣ ﻪﮐ ﺖﺳﺍ (PNG ﺮﯾﻮﺼﺗ ﮏﯾ) ﮏﺳﺎﻣ ﺮﯾﻮﺼﺗ ﺎﺠﻨﯾﺍ ﺭﺩ :ﺖﺳﺍ ﻩﺪﻣﺁ ﺎﯿﻟﺎﺘﯾﺍ ﺭﺩ Cinque Terre ﺯﺍ ﯼﺮﯾﻮﺼﺗ ﺎﺠﻨﯾﺍ ﺭﺩ :ﻢﯿﻨﮐ ﯽﻣ ﻝﺎﻤﻋﺍ ﺎﯿﻟﺎﺘﯾﺍ ،Cinque Terre ﺯﺍ ﺮﯾﻮﺼﺗ ﯼﺍﺮﺑ ﮏﺳﺎﻣ ﻪﯾﻻ ﻥﺍﻮﻨﻋ ﻪﺑ ﺍﺭ (ﻻﺎﺑ P :ﺖﺳﺍ ﻊﺒﻨﻣ ﺪﮐ ﻦﯾﺍ → ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ ﺪﻨﮐ ﯽﻣ ﺺﺨﺸﻣ ﺍﺭ ﺮﯾﻮﺼﺗ ﻪﻧﻮﮕﭼ ﺎﯾ ﺎﯾﺁ ﻪﮐ ﺪﻨﮐ ﯽﻣ ﺺﺨﺸﻣ :ﺪﺷ ﺪﻫﺍﻮﺧ ﺭﺍﺮﮑﺗ ﺎﯿﻟﺎﺘﯾﺍ ،Cinque Terre ﺯﺍ ﺮﯾﻮﺼﺗ ﺮﺳﺍﺮﺳ ﺭﺩ ﮏﺳﺎﻣ ﺮﯾﻮﺼﺗ ،ﻢﯿﻨﮐ ﻑﺬﺣ ﺍ :ﺖﺳﺍ ﻊﺒﻨﻣ ﺪﮐ ﻦﯾﺍ → ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ .ﺩﻮﺷ ﻩﺩﺎﻔﺘﺳﺍ ﮏﺳﺎﻣ ﺮﯾﻭﺎﺼﺗ ﻥﺍﻮﻨﻋ ﻪﺑ ﺪﻧﺍﻮﺗ ﯽﻣ ﺰﯿﻧ CSS ﯽﻋﺎﻌﺷ ﻭ ﯽﻄﺧ ﺐﯿﺷ :ﺩﻭﺭ ﯽﻣ (ﻑﺎﻔﺷ) ﻦﯿﯾﺎﭘ ﻪﺑ (ﻩﺎﯿﺳ) ﻻﺎﺑ ﺯﺍ ﯽﻄﺧ ﻥﺎﯾﺩﺍﺮﮔ ﻦﯾﺍ .ﻢﯿﻨﮐ ﯽﻣ ﻩﺩﺎﻔﺘﺳﺍ ﺩﻮﺧ ﺮﯾﻮ :ﺪﯿﻨﮐ ﻩﺩﺎﻔﺘﺳﺍ ﮏﺳﺎﻣ ﻪﯾﻻ ﻥﺍﻮﻨﻋ ﻪﺑ ﯽﻄﺧ ﻥﺎﯾﺩﺍﺮﮔ ﮏﯾ ﺯﺍ → ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ :ﻢﯿﻨﮐ ﯽﻣ ﻩﺩﺎﻔﺘﺳﺍ ﺩﻮﺧ ﺮﯾﻮﺼﺗ ﯼﺍﺮﺑ ﮏﺳﺎﻣ ﻪﯾﻻ ﻥﺍﻮﻨﻋ ﻪﺑ ﻦﺘﻣ ﻥﺪﻧﺎﺷﻮﭘ ﺎﺑ ﻩﺍﺮﻤﻫ ﯽﻄﺧ ﻥﺎﯾ 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. :ﺪﯿﻨﮐ ﻩﺩﺎﻔﺘﺳﺍ ﮏﺳﺎﻣ ﻪﯾﻻ ﻥﺍﻮﻨﻋ ﻪﺑ ﻦﺘﻣ ﻥﺪﻧﺎﺷﻮﭘ ﺎﺑ ﻩﺍﺮﻤﻫ ﯽﻄﺧ ﻥﺎﯾﺩﺍﺮﮔ ﮏﯾ ﺯﺍ → ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ :ﻢﯿﻨﮐ ﯽﻣ ﻩﺩﺎﻔﺘﺳﺍ ﺩﻮﺧ ﺮﯾﻮﺼﺗ ﯼﺍﺮﺑ ﮏﺳﺎﻣ ﻪﯾﻻ ﻥﺍﻮﻨﻋ ﻪﺑ (ﻩﺮﯾﺍﺩ ﻞﮑﺷ ﻪﺑ) ﯽﻋﺎﻌﺷ ﻥﺎﯾﺩﺍﺮﮔ :ﺪﯿﻨﮐ ﻩﺩﺎﻔﺘﺳﺍ (ﻩﺮﯾﺍﺩ ﮏﯾ) ﮏﺳﺎﻣ ﻪﯾﻻ ﻥﺍﻮﻨﻋ ﻪﺑ ﯽﻋﺎﻌﺷ ﻥﺎﯾﺩﺍﺮﮔ ﮏﯾ ﺯﺍ → ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ :ﻢﯿﻨﮐ ﯽﻣ ﻩﺩﺎﻔﺘﺳﺍ ﺩﻮﺧ ﺮﯾﻮﺼﺗ ﯼﺍﺮﺑ ﮏﺳﺎﻣ ﻪﯾﻻ ﻥﺍﻮﻨﻋ ﻪﺑ (ﯽﻀﯿﺑ ﻞﮑﺷ ﻪﺑ) ﯽﻋﺎﻌﺷ ﻥﺎﯾﺩﺍﺮﮔ :ﺪﯿﻨﮐ ﻩﺩﺎﻔﺘﺳﺍ (ﯽﻀﯿﺑ) ﮏﺳﺎﻣ ﻪﯾﻻ ﻥﺍﻮﻨﻋ ﻪﺑ ﺮﮕﯾﺩ ﯽﻋﺎﻌﺷ ﻥﺎﯾﺩﺍﺮﮔ ﮏﯾ ﺯﺍ → ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ ﮏﯾ ﻞﺧﺍﺩ ﺭﺩ ﻥﺍﻮﺗ ﯽﻣ ﺍﺭ ﺮﮔﺭﻭﺮﻣ ﯽﻧﺎﺒﯿﺘﺸﭘ
Property
mask-image
4.0 -webkit-
79.0 -webkit-
53.0
4.0 -webkit-
15.0 -webkit-
ﺪﯿﻨﮐ ﻩﺩﺎﻔﺘﺳﺍ ﮏﺳﺎﻣ ﻪﯾﻻ ﻥﺍﻮﻨﻋ ﻪﺑ ﺮﯾﻮﺼﺗ ﮏﯾ ﺯﺍ
ﻝﺎﺜﻣ
.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
ﯽﮔﮋﯾﻭ ﺮﮕﯾﺩ ﯽﻟﺎﺜﻣ
ﻝﺎﺜﻣ
.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>
ﺪﯿﻨﮐ ﻩﺩﺎﻔﺘﺳﺍ ﮏﺳﺎﻣ ﻪﯾﻻ ﻥﺍﻮﻨﻋ ﻪﺑ ﺎﻫ ﻥﺎﯾﺩﺍﺮﮔ ﺯﺍ
ﯽﻄﺧ ﻥﺎﯾﺩﺍﺮﮔ ﯼﺎﻫ ﻪﻧﻮﻤﻧ
ﻝﺎﺜﻣ
.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>
ﻝﺎﺜﻣ
.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>
ﺪﯿﻨﮐ ﻩﺩﺎﻔﺘﺳﺍ ﮏﺳﺎﻣ ﻪﯾﻻ ﻥﺍﻮﻨﻋ ﻪﺑ SVG ﺯﺍ