Css &
Css &
ﻣﻥ ﻛﺗﻡ ﻋﻠﻣﺎ ﻳﻌﻠﻣﻪ ﺟﺎء ﻳﻭﻡ ﺍﻟﻘﻳﺎﻣﺔ ﻣﻠﺟﻣﺎ ﺑﻠﺟﺎﻡ ﻣﻥ ﻧﺎﺭ
ﺗﻡ ﺍﻻﺳﺗﻌﺎﻧﺔ ﺑﺑﻌﺽ ﺍﻟﻣﻭﺍﻗﻊ ﺍﻟﺗﻌﻠﻳﻣﻳﺔ ﻭﺍﻟﻣﺭﺍﺟﻊ ﺍﻟﻌﻠﻣﻳﺔ ﻻﻋﺩﺍﺩ ﻫﺫﺓ ﺍﻟﻣﺎﺩﺓ ﺍﻟﻌﻣﻠﻳﺔ
ﺍﻟﺣﻣﺩ ﻟ ﺍﻟﺫﻯ ﺗﺗﻡ ﺑﻧﻌﻣﺗﻪ ﺍﻟﺻﺎﻟﺣﺎﺕ .ﻫﺫﺍ ﺍﻟﻣﺅﻟﻑ ﺻﺩﻗﺔ ﺟﺎﺭﻳﺔ
ﻋﻠﻰ ﺭﻭﺡ ﺍﺑﻰ – ﷲ ﻳﺭﺣﻣﺔ -ﻭﺻﺩﻗﺔ ﺟﺎﺭﻳﺔ ﻟﻰ .ﺳﺎﺋﻠﺔ ﺍﻟﻣﻭﻟﻰ ﺍﻥ
ﻳﺧﺩﻡ ﻛﻝ ﻁﺎﻟﺏ ﻭﺑﺎﺣﺙ ﻋﻠﻡ
ﺍﺭﺟﻭ ﻣﻣﻥ ﻳﺳﺗﻔﻳﺩ ﻣﻧﻪ ﺍﻥ ﻳﻧﺷﺭﺓ ﻋﻠﻰ ﺍﻭﺳﻊ ﻧﻁﺎﻕ .
ﺟﺯﺍﻛﻡ ﷲ ﺧﻳﺭﺍ
ﺍﺳﺎﻟﻛﻡ ﺍﻟﺩﻋﺎء
ﺷﺭﺡ ﻣﺑﺳﻁ
ﺍ ﺍ
ﻳﻌﺩ ﺍﻷﺻﺩﺍﺭ ﺍﻟﺟﺩﻳﺩ ﻣﻥ ﻟﻐﺔ ﺍﻷﻧﻣﺎﻁ ﺍﻷﻧﺳﺎﻳﺑﻳﺔ CSSﻭﻫﻭ ﺍﻻﺻﺩﺍﺭ Css 3.0
ﻧﻣﻭﺫﺝ ﺭﺍﺋﻊ ﻟﺗﺣﺳﻳﻥ ﻭﺗﺗﻁﻭﻳﺭ ﺗﻧﺳﻳﻘﺎﺕ ﺍﻟﻭﻳﺏ ،ﺣﻳﺙ ﺑﺩﺍء ﺍﻻﺻﺩﺍﺭ Css 3.0
ﻳﻅﻬﺭ ﻋﻠﻲ ﺍﻷﻓﻕ ﻭﻳﺳﺗﻌﺭﺽ ﻗﻭﺗﻪ ﺍﻟﺟﻣﺎﻟﻳﺔ ﻓﻲ ﺩﻋﻡ ﺍﻟﻌﺩﻳﺩ ﻣﻥ ﺍﻟﺧﺻﺎﺋﺹ ﻭﺍﻟﻣﺯﺍﻳﺎ
ﺍﻟﺗﻲ ﺳﺗﺗﻳﺢ ﻟﻣﺟﺗﻣﻊ ﻣﺻﻣﻣﻲ ﺍﻟﻭﻳﺏ ﺍﻟﻌﺩﻳﺩ ﻣﻥ ﺍﻟﻣﺯﺍﻳﺎ ﻭﺍﻟﺧﺻﺎﺋﺹ ﺍﻟﺟﻣﺎﻟﻳﺔ
ﻷﻋﻣﺎﻟﻬﻡ ﻭﺗﻭﻓﻳﺭ ﺍﻟﻭﻗﺕ ﻭﺍﻟﺟﻬﺩ ﺑﻌﻣﻝ ﻣﺛﻝ ﻫﺫﻩ ﺍﻟﻣﺅﺛﺭﺍﺕ ﻳﺩﻭﻳﺎ ً .
ﻟﻌﻝ ﺍﻵﻥ ﺍﻟﻣﻌﻳﻕ ﺍﻷﺳﺎﺳﻲ ﻟﻬﺫﻩ ﺍﻷﺻﺩﺍﺭﺓ ﻫﻭ ﻋﺩﻡ ﺗﻭﻓﺭ ﺍﻟﺩﻋﻡ ﺍﻟﻛﺎﻣﻝ ﻟﻬﺎ ﻣﻥ ﻗﺑﻝ
ﻛﺎﻓﺔ ﺍﻟﻣﺗﺻﻔﺣﺎﺕ ﻓﻬﻧﺎﻙ ﻣﻥ ﻳﺩﻋﻣﻬﺎ ﻭﻫﻧﺎﻟﻙ ﻻ ﻭﻛﺎﻟﻌﺎﺩﺓ ﺍﻟﻣﺗﺻﻔﺢ ﺇﻧﺗﺭﻧﺕ ﺃﻛﺳﺑﻠﻭﺭ
ﻻ ﻳﺩﻋﻡ ﻭﻫﻧﺎﻙ ﺍﻟﻌﺩﻳﺩ ﻣﻥ ﺍﻟﺧﺻﺎﺋﺹ ﺍﻳﺿﺎ ﺍﻟﺗﻲ ﻻﻳﺩﻋﻣﻬﺎ ﻓﻳﺭﻓﻭﻛﺱ ﻭﻳﺩﻋﻣﻬﺎ
ﺳﻔﺎﺭﻱ ﺑﺈﺧﺗﺻﺎﺭ ﺷﺩﻳﺩ ﺃﻧﻬﺎ ﻟﻡ ﺗﺻﻝ ﻟﻣﺳﺗﻭﻱ ﺍﻟﺩﻋﻡ ﺍﻟﻛﺎﻣﻝ ﻣﻥ ﻗﺑﻝ ﺍﻟﻣﺗﺻﻔﺣﺎﺕ
ﻭﻟﻛﻧﻬﺎ ﺍﻟﻣﺳﺗﻘﺑﻝ ﻭﻳﻭﻣﺎ ً ﻣﺎ ﺳﻧﺟﺩ ﺃﻥ ﻛﺎﻓﺔ ﺍﻟﻣﺳﺗﻌﺭﺿﺎﺕ ﺍﻟﻘﻳﺎﺳﻳﺔ ﺗﺩﻋﻣﻬﺎ ﻭﺳﻳﻠﺟﺄ
ﺍﻟﻣﺻﻣﻣﻭﻥ ﻟﻌﺩﻡ ﺍﻟﻧﻅﺭ ﺇﻟﻲ ﺑﺎﻗﻲ ﺍﻟﻣﺳﺗﻌﺭﺽ ﺍﻟﺗﻲ ﻻ ﺗﺩﻋﻣﻪ ﻷﻧﻬﺎ ﺗﺣﺗﻭﻱ ﻋﻠﻲ
ﺍﻟﻛﺛﻳﺭ ﻣﻥ ﺍﻟﻣﺯﺍﻳﺎ ﺍﻟﺭﺍﺋﻌﺔ ﺍﻟﺗﻲ ﺳﺗﺿﻑ ﺟﻭ ﻛﺑﻳﺭ ﻣﻥ ﺍﻟﺭﻓﺎﻫﻳﺔ ﻋﻠﻲ ﺗﺻﺎﻣﻳﻡ ﺍﻟﻭﻳﺏ.
ﻭﺳﻭﻑ ﻳﺗﻡ ﺷﺭﺡ ﻫﺫﺓ ﺍﻟﻭﺣﺩﺍﺕ ﺍﻟﻣﺿﺎﻓﺔ ﺍﻭ ﺍﻻﺿﺎﻓﺎﺕ ﺍﻟﺟﺩﻳﺩﺓ ﻓﻰ ﻟﻐﺔ ﺍﻟـــ CSS3
ﺍﻻﺿﺎﻓﺎﺕ ﺍﻟﺟﺩﻳﺩﺓ ﻓﻰ ﻟﻐﺔ ﺍﻟـــ CSS3
ﺍﻟﺣﻭﺍﻑ ﺍﻟﻣﺳﺗﺩﻳﺭﺓ ﻣﻥ ﺍﻻﺿﺎﻓﺎﺕ ﺍﻟﺟﺩﻳﺩﺓ ﺍﻟﺗﻰ ﺗﻣﺕ ﺍﺿﺎﻓﺗﻬﺎ ﻟﻠﻐﺔ ﺍﻟــ CSSﻭﻫﻰ
ﺧﺎﺻﻳﺔ ﺭﺍﺋﻌﺔ ﻭﻣﻥ ﻣﺯﺍﻳﺎ ﺗﺻﺎﻣﻳﻡ ﺍﻟﻭﻳﺏ ﺍﻟﺣﺩﻳﺛﺔ ﻭﺃﻏﻠﺏ ﺍﻟﻣﻭﺍﻗﻊ ﻣﻥ ﻓﺋﺔ ﺍﻟﻭﻳﺏ
2.0ﺗﺳﺗﺧﺩﻡ ﺍﻟﺣﻭﺍﻑ ﺍﻟﻣﺳﺗﺩﻳﺭﺓ ﻷﻧﻬﺎ ﺗﺿﻔﻲ ﺟﻣﺎﻟﻳﺔ ﻋﻠﻲ ﺍﻟﺗﺻﻣﻳﻡ ﻭﺗﺷﻌﺭﻙ
ﺑﺎﻷﻧﺎﻗﺔ .
ﻭﻫﺫﻩ ﺍﻟﺧﺎﺻﻳﺔ ﺍﻟﻣﻣﻳﺯﺓ ﺃﺻﺑﺣﺕ ﻣﺩﻋﻭﻣﻪ ﻭﺑﻛﻝ ﺳﻬﻭﻟﺔ ﻣﻊ css 3.0ﻭﻣﺩﻋﻭﻣﻪ ﺑﻬﺫﻩ
ﺍﻟﻣﺗﺻﻔﺣﺎﺕ ) ﻓﻳﺭﻓﻭﻛﺱ ﻭ ﺳﻔﺎﺭﻱ ( ﻭﻟﻛﻥ ﺇﻧﺗﺭﻧﺕ ﺃﻛﺳﺑﻠﻭﺭ ﻻ ﻳﺩﻋﻣﻬﺎ ﺣﺗﻲ
ﺑﺈﺻﺩﺍﺭﺗﻪ ﺍﻟﺣﺩﻳﺛﺔIE 8.0 .
ﺍﻭﻻ ﻋﻣﻝ ﻣﺳﺗﻁﻳﻝ ﺑﺧﻠﻔﻳﺔ ﺧﺿﺭﺍء ﻭﺣﻭﺍﻑ ﻣﺳﺗﺩﻳﺭﺓ ...ﻟﻌﻣﻝ ﺫﻟﻙ ﻳﺗﻡ ﻛﺗﺎﺑﺔ ﺍﻟﻛﻭﺩ
ﺍﻟﺗﺎﻟﻰ :
<!DOCTYPE html>
<html>
<head>
<style>
#rcorners1 {
border-radius: 25px;
background: #73AD21;
padding: 20px;
width: 200px;
height: 150px;
}
</style>
</head>
<body>
<p id="rcorners1">Rounded corners!</p>
</body>
</html>
ﻭﻳﻅﻬﺭ ﻓﻰ ﺍﻟﻣﺗﺻﻔﺢ ﻛﻣﺎ ﻳﻠﻰ :
ﺛﺎﻧﻳﺎ :ﻋﻣﻝ ﻣﺳﺗﻁﻳﻝ ﺑﺎﻁﺎﺭ ﺫﺍﺕ ﺣﻭﺍﻑ ﻣﺳﺗﺩﻳﺭﺓ ...ﻟﻌﻣﻝ ﺫﻟﻙ ﻳﺗﻡ ﻛﺗﺎﺑﺔ ﺍﻟﻛﻭﺩ
ﺍﻟﺗﺎﻟﻰ :
<!DOCTYPE html>
<html>
<head>
<style>
#rcorners2 {
border-radius: 25px;
border: 2px solid #73AD21;
padding: 20px;
width: 200px;
height: 150px;
}
</style>
</head>
<body>
<p id="rcorners2">Rounded corners!</p></body>
</html>
ﻭﻳﻅﻬﺭ ﻓﻰ ﺍﻟﻣﺗﺻﻔﺢ ﻛﻣﺎ ﻳﻠﻰ :
ﺛﺎﻧﻳﺎ :ﻋﻣﻝ ﻣﺳﺗﻁﻳﻝ ﺑﺧﻠﻔﻳﺔ ﺻﻭﺭﺓ ﻭﺫﺍﺕ ﺣﻭﺍﻑ ﻣﺳﺗﺩﻳﺭﺓ ...ﻟﻌﻣﻝ ﺫﻟﻙ ﻳﺗﻡ ﻛﺗﺎﺑﺔ
ﺍﻟﻛﻭﺩ ﺍﻟﺗﺎﻟﻰ :
<!DOCTYPE html>
<html>
<head>
<style>
#rcorners3 {
border-radius: 25px;
background: url(paper.gif);
background-position: left top;
background-repeat: repeat;
padding: 20px;
width: 200px;
height: 150px;
}
</style>
</head>
<body>
ﺭﺍﺑﻌﺎ :ﻋﻣﻝ ﻣﺳﺗﻁﻳﻝ ﺫﺍﺕ ﺣﻭﺍﻑ ﻣﺳﺗﺩﻳﺭﺓ ﻭﻟﻛﻥ ﺍﻟﺣﻭﺍﻑ ﻣﺳﺗﺩﻳﺭﺓ ﺑﻘﻳﻡ ﻣﺧﻧﻠﻔﺔ...
ﻓﻰ ﻫﺫﺓ ﺍﻟﺣﺎﻟﺔ ﻳﺗﻡ ﻛﺗﺎﺑﺔ ﻗﻳﻡ ﻟﻛﻝ ﺣﺎﻓﺔ ﻣﻥ ﺣﻭﺍﻑ ﺍﻟﻣﺳﺗﻁﻳﻝ ﺍﻻﺭﺑﻌﺔ ) ﺍﺫﺍ ﻛﻧﺕ
ﺗﺭﻏﺏ ﻓﻰ ﺗﻐﻳﺭ ﺍﻻﺭﺑﻌﺔ ﺟﻭﺍﻧﺏ ( .ﻭ ﻟﻌﻣﻝ ﺫﻟﻙ ﻳﺗﻡ ﻛﺗﺎﺑﺔ ﺍﻟﻛﻭﺩ ﺍﻟﺗﺎﻟﻰ :
><!DOCTYPE html
><html
><head
><style
{ #rcorners4
;background: #73AD21
;padding: 20px
;width: 200px
;height: 150px
}
{ #rcorners5
;background: #73AD21
;padding: 20px
;width: 200px
#rcorners6 {
background: #73AD21;
padding: 20px;
width: 200px;
height: 150px;
</style>
</head>
<body>
<p id="rcorners4"></p>
<p id="rcorners5"></p>
<p id="rcorners6"></p>
</body>
ﻭﻳﻅﻬﺭ ﻓﻰ ﺍﻟﻣﺳﺗﻌﺭﺽ ﻛﻣﺎ ﻳﻠﻰ :
ﻭﻳﺗﻡ ﺫﻟﻙ.. ﻳﻣﻛﻥ ﺍﻳﺿﺎ ﻋﻣﻝ ﺣﻭﺍﻑ ﺑﺷﻛﻝ ﺍﺧﺭ ﻣﺳﺗﺧﺩﻣﺎ ﻧﺳﺑﺔ ﺍﻭ ﺑﻌﻣﻠﻳﺎﺕ ﺣﺳﺎﺑﻳﺔ
: ﺑﻛﺗﺎﺑﺔ ﺍﻟﻛﻭﺩ ﻛﻣﺎ ﻳﻠﻰ
<!DOCTYPE html>
<html>
<head>
<style>
#rcorners7 {
border-radius: 50px/15px;
background: #73AD21;
padding: 20px;
width: 200px;
height: 150px;
#rcorners8 {
border-radius: 15px/50px;
background: #73AD21;
padding: 20px;
width: 200px;
height: 150px;
}
#rcorners9 {
border-radius: 50%;
background: #73AD21;
padding: 20px;
width: 200px;
height: 150px;
</style>
</head>
<body>
<p id="rcorners7"></p>
<p id="rcorners8"></p>
<p id="rcorners9"></p>
</body>
</html>
ﻭﻳﻅﻬﺭ ﻓﻰ ﺍﻟﻣﺳﺗﻌﺭﺽ ﻛﻣﺎ ﻳﻠﻰ :
ﻭﺑﻬﺫﺍ ﻧﻛﻭﻥ ﻗﺩ ﺍﻧﺗﻬﻳﻧﺎ ﻣﻥ ﺷﺭﺡ ﺍﻟﺧﺎﺻﻳﺔ ﺍﻻﻭﻟﻰ ﺍﻟﻰ ﺗﻣﺕ ﺍﺿﺎﻓﺗﻬﺎ ﻓﻰ ﺍﻻﺻﺩﺍﺭ 3
ﻭﻫﻰ ﺍﻟﺣﻭﺍﻑ ﺍﻟﻣﺳﺗﺩﻳﺭﺓ: Roudned Corners
ﺛﺎﻧﻳﺎ :ﺍﺿﺎﻓﺔ ﺻﻭﺭﺓ ﺍﻷﻁﺎﺭﺍﺕ: Border Image
ﺑﺎﺳﺗﺧﺩﺍﻣﻙ ﻟﻠﻐﺔﺍﻟـــ cssﺍﻟﺗﻘﻠﻳﺩﻳﺔ ﻳﻣﻛﻧﻙ ﺃﻥ ﺗﺿﻳﻑ ﻣﺟﻣﻭﻋﺔ ﻣﻥ ﺍﻷﻁﺎﺭﺍﺕ ﻷﻱ
ﻋﻧﺻﺭ ﻭﻟﻳﻛﻥ ﻣﺛﻼ ﻧﺹ ﺍﻭ ﺭﺍﺑﻁ ﺍﻭ ﺻﻭﺭﺓ ﻭﻫﺫﺍ ﺍﻷﻁﺎﺭ ﻳﻌﺎﻧﻲ ﻣﻥ ﺍﻟﺗﻘﻠﻳﺩﻳﺔ ﺣﻳﺙ
ﻳﻛﻭﻥ ﺑﺭﺍﻭﺯ ﺳﻭﺍء ﻟﻭﻥ ﻣﻌﻳﻥ ﺍﻭ ﻣﺣﺩﺩ ﺍﻟﻧﻘﺎﻁ ﺍﻭ ﺛﻼﺛﻲ ﺍﻟﺷﻛﻝ ﻭﻟﻛﻥ ﺑﺎﻟﻧﻬﺎﻳﺔ ﺃﺷﻛﺎﻝ
ﻣﺣﺩﺩﺓ ﻭﻣﻊ ﺍﻟﺟﻳﻝ ﺍﻟﺟﺩﻳﺩ ﻣﻥ cssﻳﻣﻛﻧﻙ ﺃﻥ ﺗﺿﻳﻑ ﻟﻬﺫﻩ ﺍﻷﻁﺎﺭﺍﺕ ﺻﻭﺭﺓ ﻣﻌﻳﻧﺔ
ﺗﺧﺗﺎﺭﻫﺎ ﺑﻧﻔﺳﻙ ..ﻭﻳﻣﻛﻧﻙ ﺍﻧﺷﺎء ﺍﻁﺎﺭﺍﺕ ﺣﺎﻭﻳﺔ ﻟﻌﻧﺎﺻﺭ ﺍﻟﺻﻔﺣﺔ ﺗﺣﺗﻭﻱ ﻋﻠﻲ
ﺻﻭﺭ
<html>
<head>
<style>
#borderimg {
padding: 15px;
</style>
</head>
<body>
!<ﺍﻟﺗﺎﻟﻰDOCTYPE
ﻳﻛﺗﺎﺑﺔ ﺍﻟﻛﻭﺩ ﺍﻻﻁﺎﺭ ﺍﻭ ﺍﻟﺑﺭﻭﺍﺯ ﺑﺩﻭﻥ ﺗﻛﺭﺍﺭ ﺍﻯ ﻳﺗﻡ ﻋﻣﻝ ﺍﺳﺗﺭﻳﺗﺵ ﻟﺔ ﻭﺫﻟﻙ
html>
<html>
<head>
<style>
#borderimg {
padding: 15px;
</style>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<style>
#borderimg {
padding: 15px;
</style>
</head>
<body>
ﻭﻳﻅﻬﺭ ﻛﻣﺎ ﻳﻠﻰ :
<!DOCTYPE html>
.... ﺍﻭ ﻛﻣﺎ ﻳﻠﻰ
<html>
<head>
<style>
#borderimg1 {
padding: 15px;
#borderimg2 {
padding: 15px;
#borderimg3 {
padding: 15px;
-1ﺧﺎﺻﻳﺔ background-size
ﻫﻰ ﺧﺎﺻﻳﺔ ﺗﺳﻣﺢ ﺑﺗﺣﺩﻳﺩ ﺍﺑﻌﺎﺩ ﺍﻟﺻﻭﺭﺓ ﺍﻟﺧﻠﻔﻳﺔ ﺑﺎﻟﺑﻳﻛﺳﻝ ﻣﻣﺎ ﻳﺳﻣﺢ ﺑﺎﻋﻁﺎء
ﺍﻟﺻﻭﺭﺓ ﻛﺧﻠﻔﻳﺔ ﺍﺑﻌﺎﺩﺍ ﺗﺧﺗﻠﻑ ﻋﻥ ﺍﻻﺑﻌﺎﺩ ﺍﻻﺻﻠﻳﺔ ﻟﻠﺻﻭﺭﺓ ﻭﻫﻭ ﻣﺎ ﻟﻡ ﻳﻛﻭﻥ
ﻣﻣﻛﻧﺎ ﻗﺑﻝ css3ﻭﻳﺗﻡ ﺍﺳﺗﺧﺩﺍﻡ ﻫﺫﺓ ﺍﻟﺧﺎﺻﻳﺔ ﻛﻣﺎ ﻳﻠﻰ ..
<!DOCTYPE html>
<html>
<head>
<style>
#example1 {
background:url(img_flwr.gif);
background-repeat: no-repeat;
padding:15px;
#example2 {
background:url(img_flwr.gif);
background-repeat: no-repeat;
padding:15px;
<p>Original background-image:</p>
<div id="example1">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam
erat volutpat.</p>
</div>
<p>Resized background-image:</p>
<div id="example2">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam
erat volutpat.</p>
ﻭﻳﻣﻛﻥ ﺍﻳﺿﺎ ﺍﺳﺗﺧﺩﺍﻡ ﻗﻳﻣﺗﺎﻥ ﺍﺧﺭﻯ ﻟﻠﺗﺣﻛﻡ ﻓﻰ ﻣﻘﺎﺱ ﺍﻟﺧﻠﻔﻳﺔ ،ﻫﺫﺍﻥ ﺍﻟﻘﻳﻣﺎﺗﺎﻥ ﻫﻣﺎ
contain and cover
ﺑﻳﺗﻡ ﺯﻳﺎﺩﺓ ﻣﻘﺎﺱ ﺍﻟﺻﻭﺭﺓ ﺍﻟﻣﺳﺗﺧﺩﻣﺔ ﻛﺧﻠﻔﻳﺔ ﻣﻊ ﻣﺭﻋﺎﺓ contain ﺑﺎﻟﻧﺳﺑﺔ ﻟــ
ﺍﻟﻣﺣﺎﻓﻅﺔ ﻋﻠﻰ ﺍﻟﻧﺳﺑﺔ ﺑﻳﻥ ﺍﻟﻁﻭﻝ ﻭﺍﻟﻌﺭﺽ
ﺑﻳﺗﻡ ﺯﻳﺎﺩﺓ ﻣﻘﺎﺱ ﺍﻟﺻﻭﺭﺓ ﺍﻟﻣﺳﺗﺧﺩﻣﺔ ﻛﺧﻠﻔﻳﺔ ﺑﺣﻳﺙ ﺗﻐﻁﻰ ﻛﻝcover ﺑﺎﻟﻧﺳﺑﺔ ﻟــ
ﺍﻟﻣﺳﺎﺣﺔ ﺍﻟﻣﻭﺟﻭﺩﺓ ﻓﻳﻬﺎ ﻛﺧﻠﻔﻳﺔ
contain ﻣﺛﺎﻝ ﻋﻠﻰ
<!DOCTYPE html>
<html>
<head>
<style>
#example1 {
background:url(gggttt.png);
background-size:contain;
background-repeat: no-repeat;
padding:15px;
</style>
</head>
<body>
<p>Resized background-image:</p>
<div id="example1">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy
nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat.</p>
ﻭﻳﻅﻬﺭ ﺑﺎﻟﻣﺳﺗﻌﺭﺽ ﻛﻣﺎ ﻳﻠﻰ :
<html>
<head>
<style>
#example1 {
background:url(gggttt.png);
background-size: cover;
background-repeat: no-repeat;
padding:15px;
</style>
</head>
<body>
<p>Resized background-image:</p>
<div id="example1">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy
nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat.</p>
ﻭﻳﻅﻬﺭ ﻓﻰ ﺍﻟﻣﺳﺗﻌﺭﺽ ﻛﻣﺎ ﻳﻠﻰ ..
<!DOCTYPE html>
<html>
<head>
<style>
#example1 {
height: 300px;
width: 300px;
background-origin: border-box;
background-size: cover;
padding-box ﻣﺛﺎﻝ ﻋﻠﻰ
<!DOCTYPE html>
<html>
<head>
<style>
#example1 {
height: 300px;
width: 300px;
background-origin: padding-box;
background-size: cover;
padding: 16px;
margin: 0 auto;
ﻭﻳﻅﻬﺭ ﻛﻣﺎ ﻳﻠﻰ
content-box ﻣﺛﺎﻝ ﻋﻠﻰ
<!DOCTYPE html>
<html>
ﻣﻼﺣﻅﺔ ﻫﺎﻣﺔ ::
ﻳﺟﺏ ﻣﺭﺍﻋﺎﺓ ﺍﻥ ﻫﻧﺎﻙ ﺑﻌﺽ ﺍﻟﺧﺻﺎﺋﺹ ﺍﻟﺗﻰ ﻳﺟﺏ ﺍﺿﺎﻓﺔ ﺑﺎﺩﺋﺔ ﺣﺗﻰ ﻳﺗﻣﻛﻥ
ﺍﻟﻣﺳﺗﻌﺭﺽ ﻣﻥ ﻓﻬﻣﻬﺎ ﻛﻣﺎ ﻳﻠﻰ
/* Safari 3-4, iOS 1-3.2, Android 1.6- */
;-webkit-border-radius: 12px
<html>
<head>
<style>
#example1 {
padding: 15px;
</style>
</head>
<body>
<div id="example1">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy
nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat.</p>
</div>
</body>
</html>
ﻭﻳﻅﻬﺭ ﻓﻰ ﺍﻟﻣﺳﺗﻌﺭﺽ ﻛﻣﺎ ﻳﻠﻰ
ﺭﺍﺑﻌﺎ :ﺍﻻ ﻟﻭﺍﻥ CSS3 Colors
ﻟﻌﻝ ﺍﻷﻟﻭﺍﻥ ﻣﺗﺎﺣﺔ ﻣﻥ ﻗﺑﻝ ﻓﻲ ﺍﻹﺟﻳﺎﻝ ﺍﻟﺳﺎﺑﻘﺔ ﻣﻥ cssﻭﻟﻛﻥ ﺍﻟﺟﺩﻳﺩ ﺃﻧﻙ ﺍﺣﻳﺎﻧﺎ ً ﺗﺭﻳﺩ
ﻣﻝء ﻣﺳﺎﺣﺔ ﻟﻭﻧﻳﺔ ﻣﺣﺩﺩﺓ ﺑﻠﻭﻥ ﻣﻌﻳﻥ ﻭﻟﻛﻥ ﺗﺭﻳﺩ ﺃﻥ ﻳﻛﻭﻥ ﻫﺫﺍ ﺍﻟﻠﻭﻥ ﺑﻳﻪ ﺩﺭﺟﺔ
ﺷﻔﺎﻓﻳﺔ ﺗﺳﻣﺢ ﻟﻠﻛﺎﺋﻥ ﺧﻠﻔﻪ ﺍﻭ ﺍﻟﺷﻛﻝ ﺍﻟﺫﻱ ﺑﺧﻠﻔﻳﺗﻪ ﺃﻥ ﻳﻅﻬﺭ ﻭﻟﻳﺱ ﻳﻅﻬﺭ ﺑﺷﻛﻝ ﻟﻭﻥ
ﻛﺎﻣﻝ ﻭﻻ ﺗﺭﻱ ﺃﻱ ﺷﺊ ﺧﻠﻔﺔ ..ﻣﺟﺭﺩ ﻣﺳﺎﺣﺔ ﻟﻭﻧﻳﺔ ﻛﺎﻣﻠﺔ ،ﺃﺻﺑﺢ ﻫﺫﺍ ﻣﺗﺎﺡ ﻓﻲ
ﺍﻷﻟﻭﺍﻥ ﻓﻲ cssﺍﻷﺻﺩﺍﺭ ﺍﻟﺟﺩﻳﺩ ﺣﻳﺙ ﻳﻣﻛﻧﻙ ﺍﺧﺗﻳﺎﺭ ﺃﻱ ﺩﺭﺟﺔ ﻟﻭﻧﻳﺔ ﻭﻛﺫﻟﻙ ﺍﺧﺗﻳﺎﺭ
ﺩﺭﺟﺔ ﺍﻟﺷﻔﺎﻓﻳﺔ ﻟﻬﺫﺍ ﺍﻟﻠﻭﻥ.
ﻭ ﻭﻛﻣﺎ ﻫﻭ ﻣﻌﺭﻭﻑ ﺍﻧﺔ ﺍﻹﺟﻳﺎﻝ ﺍﻟﺳﺎﺑﻘﺔ ﻣﻥ cssﻛﺎﻧﺕ ﺍﻟﻠﻐﺔ ﺗﻣﻛﻥ ﻣﻥ ﺗﺣﺩﻳﺩ
" ("#ff0000ﺍﻭ ﺑﺎﺳﻡ ﺍﻟﻠﻭﻥ ) hexadecimal ﺍﻻﻟﻭﺍﻥ ﺍﻣﺎ ﺑﺎﺳﺗﺧﺩﺍﻡ ﺍﻟﻧﻅﺎﻡ ﺍﻟﻌﺷﺭﻯ
)")( "rgb(255, 0, 0 ) ( yellowﺍﻭ ﺑﺎﺳﺗﺧﺩﺍﻡ ﻧﻅﺎﻡ ﺍﻟــ rgb
ﺍﻣﺎ ﻓﻰ ﺍﻻﺻﺩﺍﺭ ﺍﻟﺟﺩﻳﺩ ﻣﻥ ﺍﻟﻠﻐﺔ ﻓﻘﺩ ﺗﻡ ﺗﺣﺩﻳﺩ ﺍﻟﻠﻭﻥ ﻣﻊ ﺍﺿﺎﻓﺔ ﺑﻌﺽ ﺍﻟﻘﻳﻡ ﻛﻣﺎ ﻳﻠﻰ
:
)rgba(red, green, blue, alpha ﺍﻭﻻ ﺗﺣﺩﻳﺩ ﺍﻟﻠﻭﻥ ﺑﺎﻟﺗﺣﻛﻡ ﻓﻰ ﻗﻳﻡ : RGBA
ﻓﻰ ﻫﺫﺍ ﺍﻟﻧﻅﺎﻡ ﺑﻳﺗﻡ ﺗﺣﺩﻳﺩ ﺍﻟﻠﻭﻥ ﻛﻣﺎ ﻛﺎﻥ ﺳﺎﺑﻘﺎ ﺑﺎﻻﺿﺎﻓﺔ ﺍﻟﻰ ، alphaﻭﺗﺗﺭﺍﻭﺡ
alphaﻣﺎ ﺑﻳﻥ ﺍﺩﻧﻰ ﻗﻳﻣﺔ ﻭﻫﻰ 0.0ﺍﻟﻰ ﺍﻋﻠﻰ ﻗﻳﻣﺔ ﻭﻫﻰ 1.0ﻛﻣﺎ ﻫﻭ ﻣﻭﺿﺢ
ﺑﺎﻟﺷﻛﻝ :
<html>
<head>
<style>
#p1 {background-color:rgba(255,0,0,0.3);}
#p2 {background-color:rgba(0,255,0,0.3);}
#p3 {background-color:rgba(0,0,255,0.3);}
#p4 {background-color:rgba(192,192,192,0.3);}
#p5 {background-color:rgba(255,255,0,0.3);}
#p6 {background-color:rgba(255,0,255,0.3);}
</style>
</head>
<body>
<p>RGBA colors:</p>
<p id="p1">Red</p>
<p id="p2">Green</p>
<p id="p3">Blue</p>
<p id="p4">Grey</p>
<p id="p5">Yellow</p>
<p id="p6">Cerise</p>
</body>
</html>
ﺍﻭ ﺑﻛﺗﺎﺑﺔ ﺍﻟﻛﻭﺩ ﺑﺷﻛﻝ ﺍﺧﺭ ﻛﻣﺎ ﻳﻠﻰ ﻭﺗﻅﻬﺭ ﻧﻔﺱ ﺍﻟﻧﺗﻳﺟﺔ
<!DOCTYPE html>
<html>
<head>
<style>
#p1 {background-color:rgba(255,0,0,0.3);}
#p2 {background-color:rgba(0,255,0,0.3);}
#p3 {background-color:rgba(0,0,255,0.3);}
#p4 {background-color:rgba(192,192,192,0.3);}
#p5 {background-color:rgba(255,255,0,0.3);}
#p6 {background-color:rgba(255,0,255,0.3);}
</style>
</head>
<body>
<p>RGBA colors:</p>
</body>
</html>
hsl(hue, saturation, ﺛﺎﻧﻳﺎ :ﺗﺣﺩﻳﺩ ﺍﻟﻠﻭﻥ ﺑﺎﻟﺗﺣﻛﻡ ﻓﻰ ﻗﻳﻡ : HSL Colors
lightness).
ﻓﻰ ﻫﺫﺍ ﺍﻟﻧﻅﺎﻡ ﻳﺗﻡ ﺗﺣﺩﻳﺩ ﻗﻳﻣﺔ ﺍﻟﻠﻭﻥ ﺑﺎﻟﺗﺣﻛﻡ ﻓﻰ ﻗﻳﻣﺔ ﺍﻟﻠﻭﻥ ﻓﻰ ﺛﻼﺛﺔ ﺍﺷﻳﺎء :
Hue -ﻳﻌﻧﻰ ﻗﻳﻣﺔ ﺍﻟﻠﻭﻥ ﻓﻰ ﻋﺟﻠﺔ ﺍﻻﻟﻭﺍﻥ ﻫﻝ ﺍﻟﻠﻭﻥ ﺍﺣﻣﺭ ﻭﻻ ﺍﺻﻔﺭ ﻭﻻ
، )(0 to 360 ﺑﻧﻔﺳﺟﻰ ،ﻭﻫﻭ ﻳﺗﺭﺍﻭﺡ ﻣﺎ ﺑﻳﻥ
.
-ﺍﻳﺿﺎ ﺍﻟﺗﺣﻛﻡ ﻓﻰ ﺩﺭﺟﺔ ﺍﻟﻭﺿﻭﺡ ﺍﻭ ﺩﺭﺟﺔ ﺍﻟﺗﺷﺑﻊ ﻳﻌﻧﻰ ﺍﺣﻣﺭ ﻗﻭﻯ ﺟﺩﺍ ﻭﻻ
ﺍﺣﻣﺭ ﺿﻌﻳﻑ ﺟﺩﺍ ) Saturationﺳﻭﺍء ﺑﺎﻟﺯﻳﺎﺩﺓ ﺍﻭ ﺍﻟﺗﻘﻠﻳﻝ ( ﻭﻫﻰ ﺗﻛﻭﻥ ﻧﺳﺑﺔ
ﻣﺋﻭﻳﺔ ،ﻧﺳﺑﺔ %100ﻫﻰ ﺍﻋﻠﻰ ﺩﺭﺟﺔ ﻭﺿﻭﺡ ﺍﻭ ﺗﺷﺑﻊ ﻟﻠﻭﻥ
<!DOCTYPE html>
<html>
<head>
<style>
#p1 {background-color:hsl(120,100%,50%);}
#p2 {background-color:hsl(120,100%,75%);}
#p3 {background-color:hsl(120,100%,25%);}
#p4 {background-color:hsl(120,60%,70%);}
#p5 {background-color:hsl(290,100%,50%);}
#p6 {background-color:hsl(290,60%,70%);}
</style>
</head>
<body>
<p>HSL colors:</p>
<p id="p1">Green</p>
<p id="p5">Violet</p>
</body>
</html>
ﻭ ﻳﻅﻬﺭ ﻓﻰ ﺍﻟﻣﺳﺗﻌﺭﺽ ﻛﻣﺎ ﻳﻠﻰ :
<!DOCTYPE html>
<html>
<head>
<style>
#p1 {background-color:hsla(120,100%,50%,0.3);}
#p2 {background-color:hsla(120,100%,75%,0.3);}
#p3 {background-color:hsla(120,100%,25%,0.3);}
#p4 {background-color:hsla(120,60%,70%,0.3);}
#p5 {background-color:hsla(290,100%,50%,0.3);}
#p6 {background-color:hsla(290,60%,70%,0.3);}
</style>
</head>
<body>
<p>HSLA colors:</p>
<p id="p1">Green</p>
<p id="p5">Violet</p>
</body>
</html>
ﻭﻳﻅﻬﺭ ﻓﻰ ﺍﻟﻣﺳﺗﻌﺭﺽ ﻛﻣﺎ ﻳﻠﻰ
<html>
<head>
<style>
#p1 {background-color:rgb(255,0,0);opacity:0.6;}
#p2 {background-color:rgb(0,255,0);opacity:0.6;}
#p3 {background-color:rgb(0,0,255);opacity:0.6;}
#p4 {background-color:rgb(192,192,192);opacity:0.6;}
#p5 {background-color:rgb(255,255,0);opacity:0.6;}
#p6 {background-color:rgb(255,0,255);opacity:0.6;}
</style>
</head>
<body>
<p id="p1">Red</p>
<p id="p2">Green</p>
<p id="p3">Blue</p>
<p id="p4">Grey</p>
<p id="p5">Yellow</p>
<p id="p6">Cerise</p>
</body>
</html>
ﻭﺑﻬﺫﺍ ﻧﻛﻭﻥ ﻗﺩ ﺍﻧﺗﻬﻳﻧﺎ ﻣﻥ ﺭﺍﺑﻊ ﻣﻛﻭﻥ ﺍﻭ ﺍﺿﺎﻓﺔ ﺟﺩﻳﺩﺓ ﻣﻥ ﺍﻟﻭﺣﺩﺍﺕ ﺍﻟﻣﺿﺎﻓﺔ ﺍﻭ
ﺍﻻﺿﺎﻓﺎﺕ ﺍﻟﺟﺩﻳﺩﺓ ﻓﻰ ﻟﻐﺔ ﺍﻟـــ CSS3
ﺧﺎﻣﺳﺎ :ﺍﻟﺗﺩﺭﻳﺟﺎﺕ ﺍﻟﻠﻭﻧﻳﺔ CSS3 Gradients
ﺧﺎﺻﻳﺔ ﺟﺩﻳﺩﺓ ﺃﺧﺭﻯ ﺗﻡ ﺍﺿﺎﻓﺗﻬﺎ ﻟﻠﻐﺔ ﻭﻫﻲ ﺇﺿﺎﻓﺔ ﺍﻟﺗﺩﺭﺟﺎﺕ ﺍﻟﻠﻭﻧﻳﺔ ،ﻭﺍﻟﺗﻲ ﻳﻣﻛﻥ
ﺇﺿﺎﻓﺗﻬﺎ ﺑﻛﻭﺩ ﺑﺳﻳﻁ ﺑﺩﻝ ﺻﻧﻊ ﺻﻭﺭﺓ ﺧﺎﺻﺔ ﻭﻭﺿﻌﻬﺎ ،ﻭﻫﻧﺎﻙ ﺍﻛﺛﺭ ﻣﻥ ﺷﻛﻝ
ﻟﻠﺗﺗﺩﺭﻳﺞ ﺍﻟﻠﻭﻧﻰ ﻛﻣﺎ ﻳﻠﻰ :
<html>
<head>
<style>
#grad1 {
height: 200px;
</style>
</head>
<body>
<p>This linear gradient starts at the top. It starts red, transitioning to yellow:</p>
<div id="grad1"></div>
</body>
</html>
ﻭ ﻳﻅﻬﺭ ﻓﻰ ﺍﻟﻣﺳﺗﻌﺭﺽ ﻛﻣﺎ ﻳﻠﻰ ﻳﻠﻰ
<!DOCTYPE html>
<html>
<head>
<style>
#grad1 {
height: 200px;
</style>
</head>
<body>
<p>This linear gradient starts at the left. It starts red, transitioning to yellow:</p>
<div id="grad1"></div>
</body>
</html>
• ﺍﻟﺗﺩﺭﻳﺢ ﺍﻟﻠﻭﻧﻰ ﺑﺷﻛﻝ ﻁﻭﻟﻰ ﻣﻊ ﺗﺣﺩﻳﺩ ﺍﺗﺟﺎﻫﺔ ﺍﻻﻓﻘﻰ ﻭﺍﻟﺭﺍﺳﻰ
Linear Gradient – Diagonal
<html>
<head>
<style>
#grad1 {
height: 200px;
</style>
</head>
<body>
<p>This linear gradient starts at top left. It starts red, transitioning to yellow:</p>
• ﻋﻣﻝ ﺗﺗﺩﺭﻳﺢ ﻟﻭﻧﻰ ﻣﻊ ﺗﺣﺩﻳﺩ ﺍﺗﺟﺎﻫﺔ ﺍﻟﺗﺩﺭﻳﺞ ﺍﻟﻠﻭﻧﻰ ﺑﺗﺣﺩﻳﺩ ﺯﺍﻭﻳﺔ ﺍﻟﺗﺗﺩﺭﻳﺞ
ﺍﻟﻠﻭﻧﻰ
• Using Angles
<!DOCTYPE html>
<html>
<head>
<style>
#grad1 {
height: 100px;
#grad2 {
height: 100px;
height: 100px;
#grad4 {
height: 100px;
</style>
</head>
<body>
• ﻋﻣﻝ ﺗﺗﺩﺭﻳﺢ ﻣﺗﻌﺩﺩ ﺍﻻﻟﻭﺍﻥ
<!DOCTYPE html>
<html>
<head>
<style>
#grad1 {
height: 200px;
#grad2 {
height: 200px;
height: 200px;
background: -webkit-linear-gradient(red 10%, green 85%, blue 90%); /* For Safari 5.1 to
6.0 */
background: -o-linear-gradient(red 10%, green 85%, blue 90%); /* For Opera 11.1 to 12.0
*/
background: -moz-linear-gradient(red 10%, green 85%, blue 90%); /* For Firefox 3.6 to 15
*/
background: linear-gradient(red 10%, green 85%, blue 90%); /* Standard syntax (must be
last) */
</style>
</head>
<body>
<div id="grad1"></div>
<div id="grad2"></div>
• ﻣﺛﺎﻝ ﻋﻠﻰ ﻋﻣﻝ ﺗﺗﺩﺭﻳﺢ ﻣﺗﻌﺩﺩ ﺍﻻﻟﻭﺍﻥ ﻣﻥ ﺍﻟﺷﻣﺎﻝ ﺍﻟﻰ ﺍﻟﻳﻣﻳﻥ
<!DOCTYPE html>
<html>
<head>
<style>
#grad1 {
height: 55px;
background: -webkit-linear-gradient(left, red, orange, yellow, green, blue, indigo, violet); /* For
Safari 5.1 to 6.0 */
background: -o-linear-gradient(left, red, orange, yellow, green, blue, indigo, violet); /* For Opera
11.1 to 12.0 */
background: -moz-linear-gradient(left, red, orange, yellow, green, blue, indigo, violet); /* For Fx
3.6 to 15 */
background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet); /* Standard
syntax (must be last) */
</style>
</head>
<body>
<html>
<head>
<style>
#grad1 {
height: 200px;
</style>
</head>
<body>
<p>To add transparency, we use the rgba() function to define the color stops. The last parameter in
• ﻋﻣﻝ ﺗﻛﺭﺍﺭ ﻟﻠﺗﺗﺩﺭﻳﺢ ﺍﻟﻠﻭﻧﻰ
Repeating a linear-gradient
<!DOCTYPE html>
<html>
<head>
<style>
#grad1 {
height: 200px;
background: -o-repeating-linear-gradient(red, yellow 10%, green 20%); /* For Opera 11.1 to 12.0
*/
#grad2 {
height: 200px;
<html>
<head>
<style>
#grad1 {
height: 150px;
width: 200px;
</style>
</head>
<body>
<div id="grad1"></div>
• ﻋﻣﻝ ﺗﺗﺩﺭﻳﺞ ﻟﻭﻧﻰ ﺑﺷﻛﻝ ﺩﺍﺋﺭﻯ ﻣﻊ ﺗﺣﺩﻳﺩ ﻣﺳﺎﺣﺔ ﻛﻝ ﻟﻭﻥ ﻣﻥ ﺍﻟﻭﺍﻥ ﺍﻟﺗﺩﺭﻳﺢ
ﺍﻟﻠﻭﻧﻰ
Radial Gradient - Differently Spaced Color Stops
<!DOCTYPE html>
<html>
<head>
<style>
#grad1 {
height: 150px;
width: 200px;
background: -o-radial-gradient(red 5%, yellow 15%, green 60%); /* For Opera 11.6 to 12.0 */
background: -moz-radial-gradient(red 5%, yellow 15%, green 60%); /* For Firefox 3.6 to 15 */
background: radial-gradient(red 5%, yellow 15%, green 60%); /* Standard syntax (must be last)
*/
</style>
</head>
<body>
<div id="grad1"></div>
</body>
</html>
• ﻋﻣﻝ ﺗﺗﺩﺭﻳﺞ ﻟﻭﻧﻰ ﺑﺷﻛﻝ ﺩﺍﺋﺭﻯ ﻣﺣﺩﺩ
<!DOCTYPE html>
<html>
<head>
<style>
#grad1 {
height: 150px;
width: 200px;
#grad2 {
height: 150px;
width: 200px;
}
</style>
</head>
<body>
<div id="grad1"></div>
<p><strong>Circle:</strong></p>
<div id="grad2"></div>
</body>
</html>
<html>
<head>
<style>
h1 {
</style>
</head>
<body>
<h1>Text-shadow effect!</h1>
<p><b>Note:</b> Internet Explorer 9 and earlier versions, do not support the text-shadow
property.</p>
</body>
</html>
.2ﺍﺿﺎﻓﺔ ﺍﻟﻅﻝ ﻟﻠﻧﺻﻭﺹ ﻭﺗﺣﺩﻳﺩ ﺍﻟﺣﺟﻡ ﻭ ﺍﻟﻠﻭﻥ CSS3 Text Shadow
<!DOCTYPE html>
<html>
<head>
<style>
h1 {
</style>
</head>
<body>
<h1>Text-shadow effect!</h1>
<p><b>Note:</b> Internet Explorer 9 and earlier versions, do not support the text-shadow
property.</p>
</body>
</html>
CSS3 Text ﺍﺿﺎﻓﺔ ﺍﻟﻅﻝ ﻟﻠﻧﺻﻭﺹ ﻭﺗﺣﺩﻳﺩ ﺍﻟﺣﺟﻡ ﻭ ﺍﻟﻠﻭﻥ ﻭﺩﺭﺟﺔ ﺍﻟﺩﻗﺔ.3
Shadow blur
<!DOCTYPE html>
<html>
<head>
<style>
h1 {
</style>
</head>
<body>
<h1>Text-shadow effect!</h1>
<p><b>Note:</b> Internet Explorer 9 and earlier versions, do not support the text-shadow
property.</p>
</body>
</html>
.4ﺍﺿﺎﻓﺔ ﺍﻟﻅﻝ ﻟﻠﻧﺻﻭﺹ ﻭﺗﺣﺩﻳﺩ ﺍﻟﺣﺟﻡ ﻭ ﺍﻟﻠﻭﻥ ﻣﺳﺗﺧﺩﻣﺎ ﺍﻻﺑﻳﺽ ﻭﺍﻻﺳﻭﺩ
<!DOCTYPE html>
<html>
<head>
<style>
h1 {
color: white;
</style>
</head>
<body>
<h1>Text-shadow effect!</h1>
<p><b>Note:</b> Internet Explorer 9 and earlier versions, do not support the text-shadow
property.</p>
</body>
</html>
.5ﻣﺛﺎﻝ ﺍﺿﺎﻓﺔ ﺍﻟﻅﻝ ﻟﻠﻧﺻﻭﺹ
<!DOCTYPE html>
<html>
<head>
<style>
h1 {
</style>
</head>
<body>
<h1>Text-shadow effect!</h1>
<p><b>Note:</b> Internet Explorer 9 and earlier versions, do not support the text-shadow
property.</p>
</body>
</html>
ﺍﺿﺎﻓﺔ ﺍﻟﻅﻝ ﻟﻠﻧﺻﻭﺹ ﻣﺳﺗﺧﺩﻣﺎ ﺍﻛﺛﺭ ﻣﻥ ﻅﻝ.6
Multiple Shadows
<!DOCTYPE html>
<html>
<head>
<style>
h1 {
</style>
</head>
<body>
<h1>Text-shadow effect!</h1>
<p><b>Note:</b> Internet Explorer 9 and earlier versions, do not support the text-shadow
property.</p>
</body>
</html>
.7ﻣﺛﺎﻝ ﻋﻠﻰ ﺍﺿﺎﻓﺔ ﺍﻟﻅﻝ ﻟﻠﻧﺻﻭﺹ ﻣﺳﺗﺧﺩﻣﺎ ﺍﻻﺑﻳﺽ ﻭ ﺍﻻﺯﺭﻕ ﺍﻟﻔﺎﺗﺢ
ﻭﺍﻟﻐﺎﻣﻕ
<!DOCTYPE html>
<html>
<head>
<style>
h1 {
color: white;
</style>
</head>
<body>
<h1>Text-shadow effect!</h1>
<p><b>Note:</b> Internet Explorer 9 and earlier versions, do not support the text-shadow
property.</p>
</body>
</html>
ﻳﻤﻜﻦ ﺍﻻﺳﺘﻌﺎﻧﺔ ﺑﺎﺷﻜﺎﻝ ﺍﺧﺮﻯ ﻟﻠـ CSS Box Shadowﻋﻠﻰ ﺍﻟﺮﺍﺑﻂ ﺍﻟﺘﺎﻟﻰ
/https://css-tricks.com/snippets/css/css-box-shadow
ﺳﻮﻑ ﻧﺘﻄﺮﻕ ﻓﻰ ﺍﻟﺠﺰء ﺍﻟﺨﺎﺹ ﺑﺎﻟﻨﺼﻮﺹ ﺍﻟﻰ ﺍﺭﺑﻌﺔ ﻣﻦ ﺍﻟﺨﺼﺎﺋﺺ ﺍﻟﺠﺪﻳﺪﺓ ﺍﻟﺘﻰ
ﺍﺿﻴﻔﺖ ﻓﻰ ﺍﻻﺻﺪﺍﺭ ﺍﻟﺠﺪﻳﺪ ﻣﻦ ﺍﻟﻠﻐﺔ :
.8ﺍﻭﻻ :ﺍﺿﺎﻓﺔ ﺍﻟﻈﻞ ﻟﻠﻨﺼﻮﺹ ﻭﺗﺤﺪﻳﺪ ﺍﻟﺤﺠﻢ ﻭ ﺍﻟﻠﻮﻥ ﻭﺩﺭﺟﺔ ﺍﻟﺪﻗﺔ ﻭﺍﻟﻜﺜﺎﻓﺔ
ﻭﺍﻟﺸﻔﺎﻓﻴﺔ – ﻭﻗﺪ ﺳﺒﻖ ﻭﺍﻥ ﺗﻨﺎﻭﻟﻨﺎ ﺑﺎﻟﺸﺮﺡ ﻫﺬﺍ ﺍﻟﺠﺰء – ﺭﺍﺟﻊ ﺍﺿﺎﻓﺔ ﺍﻟﻈﻞ ﻓﻰ ﻟﻐﺔ
ﺍﻟــ css
.9ﺛﺎﻧﻴﺎ :ﺗﻘﻄﻴﻊ ﺍﻟﻨﺺ ﻓﻲ ﺁﺧﺮ ﺍﻟﻜﻠﻤﺔ ﺃﻭ ﺑﻌﺪ ﺭﻣﻮﺯ ﺍﻟﺘﻨﻘﻴﻂ ،ﺇﻻ ﻓﻲ ﺣﺎﻟﺔ ﺍﻟﻜﻠﻤﺎﺕ
ﺍﻟﻄﻮﻳﻠﺔ )ﻛﻌﻨﺎﻭﻳﻦ ﺍﻟﻮﻳﺐ ﻭ ﺍﻟﺮﻭﺍﺑﻂ ﻣﺜﻼ ( ﻓﻴﺘﻢ ﺍﻟﺘﻘﻄﻴﻊ ﺩﺍﺧﻠﻬﺎ ﺣﺘﻰ ﻳﺘﻼءﻡ ﺍﻟﻨﺺ
ﺑﺎﻟﻀﺒﻂ ﻣﻊ ﺣﺪﻭﺩ ﺍﻟﻤﺴﺎﺣﺔ ﺍﻭ ﺍﻟﻄﺒﻘﻪ CSS3 Word Wrap
ﻫﺫﺍ ﺍﻟﻧﺹ ﻳﺣﺗﻭﻱ ﻋﻠﻰ ﻛﻠﻣﺔ ﻁﻭﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻠﺔ .ﺳﺗﺗﺟﺎﻭﺯ ﺣﺩﻭﺩ ﺍﻟﻁﺑﻘﺔ ><div
></divﺍﻟﻭ ﺍﻟﻣﺳﺎﺣﺔ ﺭﻏﻡ ﺃﻧﻧﺎ ﺣﺩﺩﻧﺎ ﻋﺭﺿﻬﺎ
><h2>break-all</h2
ﺗﻘﻭﻡ ﺑﺗﻘﻁﻳﻊ ﺍﻟﻧﺹ ﻓﻲ ﺃﻱ ﻣﻛﺎﻥ ﻣﻥ ﺍﻟﻛﻠﻣﺔ ﻟﺗﺗﻼءﻡ ﺑﺎﻟﺿﺑﻁ ﻣﻊ ﺣﺩﻭﺩ ﺍﻟﻁﺑﻘﺔ word-breakﺍﻟﺧﺎﺻﻳﺔ>"<div class="break
> .</divﻭ ﻫﺫﻩ ﻛﻠﻣﺔ ﻁﻭﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻠﺔ ﺳﻳﺗﻡ ﺗﻘﻁﻳﻌﻬﺎ ﺃﻳﺿﺎ
><h2>break-word</h2
ﺗﻘﻭﻡ ﺑﺗﻘﻁﻳﻊ ﺍﻟﻧﺹ ﻓﻲ ﺁﺧﺭ ﺍﻟﻛﻠﻣﺔ ،ﺇﻻ ﻓﻲ ﺣﺎﻟﺔ ﺍﻟﻛﻠﻣﺎﺕ word-wrapﺍﻟﺧﺎﺻﻳﺔ>"<div class="wrap
></divﺍﻟﻁﻭﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻳﻠﺔ ﻓﺳﻳﺗﻡ ﺍﻟﺗﻘﻁﻳﻊ ﺩﺍﺧﻠﻬﺎ
></body
></html
ﻭﻳﻈﻬﺮ ﻓﻰ ﺍﻟﻤﺴﺘﻌﺮﺽ ﻛﻤﺎ ﻳﻠﻰ
.10ﺛﺎﻟﺜﺎ :ﺍﻟﺘﺤﻜﻢ ﻓﻰ ﺍﻟﻨﺼﻮﺹ ﺍﻟﺘﻲ ﺗﺨﺮﺝ ﻣﻦ ﺍﻟﻤﺤﺘﻮﻯ CSS3 Text
. Overflowﻫﺬﺓ ﺍﻟﺨﺎﺻﻴﺔ text-overflowﺗﻘﻮﻡ ﺑﺘﺤﺪﻳﺪ ﻭﺿﻌﻴﺔ ﺍﻟﻨﺺ ﻋﻨﺪﻣﺎ
ﻳﺘﺠﺎﻭﺯ ﻫﺬﺍ ﺍﻟﻨﺺ ﺣﺪﻭﺩ ﺍﻟﻄﺒﻘﺔ ﺍﻭ ﺍﻟﻤﺴﺎﺣﺔ .ﻭﻳﻤﻜﻨﻨﺎ ﺇﻋﻄﺎءﻫﺎ ﺍﻟﻘﻴﻢ ﺍﻟﺘﺎﻟﻴﺔ
: clip|ellipsis|string|initial|inherit
><!DOCTYPE html
><head
>"<meta charset="utf-8
><style
{ .overflows
*/ﺗﺣﺫﻑ ﺍﻟﻔﺭﺍﻏﺎﺕ ﺍﻟﺑﻳﺿﺎء ﻭ ﺗﺟﺑﺭ ﺍﺳﺗﻛﻣﺎﻝ ﺍﻟﻧﺹ ﻓﻲ ﺳﻁﺭ ﻭﺍﺣﺩ *white-space: nowrap; /
*/ﺇﺧﻔﺎء ﺍﻟﻧﺹ ﺍﻟﺫﻱ ﻳﺗﺟﺎﻭﺯ ﺣﺩﻭﺩ ﺍﻟﻣﺳﺎﺣﺔ ﺍﻭ ﺍﻟﻁﺑﻘﺔ *overflow : hidden; /
}
{ .clip
;text-overflow: clip
}
{.ellipsis
;text-overflow: ellipsis
}
></style
></head
><body
><h1>text-overflow</h1
><div ></divﻋﻠﻳﻪ text-overflowﻫﺫﺍ ﺍﻟﻧﺹ ﺍﻟﻁﻭﻳﻝ ﻟﻥ ﻳﺗﻡ ﻋﺭﺿﻪ ﻛﺎﻣﻼ ﺃﺛﻧﺎء ﺗﻁﺑﻳﻕ ﻧﻣﻁ
ﻭﻳﻈﻬﺮ ﻓﻰ ﺍﻟﻤﺴﺘﻌﺮﺽ ﻛﻤﺎ ﻳﻠﻰ
.11ﺭﺍﺑﻌﺎ :ﺗﻘﻄﻴﻊ ﺍﻟﻨﺺ ﻭﺳﻂ ﺍﻟﻜﻠﻤﺔ ﺃﻭ ﺧﺎﺭﺟﻬﺎ ﺣﺘﻰ ﻳﺘﻼءﻡ ﺍﻟﻨﺺ ﺑﺎﻟﻀﺒﻂ ﻣﻊ
ﺣﺪﻭﺩ ﺍﻟﻤﺴﺎﺣﺔ ﺍﻭ ﺍﻟﻄﺒﻘﻪ CSS3 Word Break
<html>
<head>
<style>
p.test1 {
width: 140px;
word-break: keep-all;
p.test2 {
width: 140px;
word-break: break-all;
</style>
</head>
<body>
<p class="test2">This paragraph contains some text. The lines will break at any character.</p>
<p><b>Note:</b> The word-break property is not supported in Opera 12 and earlier versions.</p>
</body>
</html>
ﻭﻳﻈﻬﺮ ﻓﻰ ﺍﻟﻤﺴﺘﻌﺮﺽ ﻛﻤﺎ ﻳﻠﻰ
ﺷﻜﻞ ﻳﻮﺿﺢ ﺟﻤﻴﻊ ﺍﻟﻘﻴﻢ ﻟﻠﺨﺎﺻﻴﺘﻴﻦ ﺍﻟﺴﺎﺑﻘﺘﻴﻦ
ﻭﺑﻬﺫﺍ ﻧﻛﻭﻥ ﻗﺩ ﺍﻧﺗﻬﻳﻧﺎ ﻣﻥ ﺳﺎﺑﻊ ﻣﻛﻭﻥ ﺍﻭ ﺍﺿﺎﻓﺔ ﺟﺩﻳﺩﺓ ﻣﻥ ﺍﻻﺿﺎﻓﺎﺕ ﺍﻟﺟﺩﻳﺩﺓ ﻓﻰ
ﻟﻐﺔ ﺍﻟـــ CSS3
ﺛﺎﻣﻧﺎ :ﺍﻟﺧﻁﻭﻁ CSS3 Web Fonts
ﻫﺬﻩ ﺍﻟﺨﺎﺻﻴﺔ ﻟﻴﺴﺖ ﺟﺪﻳﺪﺓ ﺭﻏﻢ ﺃﻧﻬﺎ ﻅﻬﺮﺕ ﻣﻊ CSS3ﻓﻘﺪ ﻅﻬﺮﺕ ﺍﻟﺨﺎﺻﻴﺔ
ﻣﺴﺒﻘﺎ ً ﻓﻲ ﻧﺴﺦ ieﺍﻟﻘﺪﻳﻤﺔ ،ﺛﻢ ﺗﻢ ﺍﻟﺘﺨﻠﻲ ﻋﻨﻬﺎ ﻟﻠﻤﺸﺎﻛﻞ ﺍﻟﺘﻲ ﻛﺎﻧﺖ ﻓﻴﻬﺎ ،ﻭﻅﻬﺮﺕ
ﺑﺤﻠﺔ ﺟﺪﻳﺪﺓ ﻣﺠﺪﺩﺍً ﻓﻲ ﺁﺧﺮ ﻧﺴﺨﺔ.
ﻣﻔﻬﻮﻡ ﻫﺬﻩ ﺍﻟﺨﺎﺻﻴﺔ ﺑﺒﺴﺎﻁﺔ ﻟﻤﻦ ﻻ ﻳﻌﺮﻓﻬﺎ ﻫﻮ ﺃﻧّﻚ ﺗﺴﺘﻄﻴﻊ ﺍﺳﺘﻌﻤﺎﻝ ﺃﻱ ﺧﻂّ ﺗﺮﻳﺪﻩ
ﻓﻲ ﺍﻟﻤﻮﻗﻊ ﺑﺪﻻً ﻣﻦ ﺍﻟﺨﻄﻮﻁ ﺍﻹﻓﺘﺮﺍﺿﻴﺔ ﻟﻠﻤﺘﺼﻔﺤﺎﺕ ﺃﻭ ﺍﻟﺨﻄﻮﻁ ﺍﻟﻮﻳﺐ
ﺍﻵﻣﻨﺔ )ﻭﺍﻟﺘﻲ ﺃﺻﺒﺤﺖ ﻣﻤﻠﺔً ﺟﺪﺍً( ،ﻭﻫﻲ ﺑﺴﻴﻄﺔ ﺟﺪﺍً ﻅﺎﻫﺮﻳﺎً ،ﻓﻜﻞ ﻣﺎ ﻋﻠﻴﻚ ﻓﻌﻠﻪ ﻫﻮ
ﺇﺩﺭﺍﺝ ﻣﺴﺎﺭ ﺍﻟﺨﻂ ،ﻭﺇﻋﻄﺎﺋﻪ ﺍﺳﻤﺎً ،ﺛﻢ ﺍﺳﺘﺨﺪﺍﻣﻪ ﻻﺣﻘﺎ ً ﻓﻲ ﻣﻠﻒ ﺍﻝ CSSﺍﻟﺨﺎﺹ
ﺑﻚ.
<html>
<head>
<style>
@font-face {
src: url('droidnaskh-regular.ttf');}
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: myFirstFont;
src: url(sansation_bold.woff);
font-weight: bold;
div {
font-family: myFirstFont;
</style>
</head>
<body>
<div>
With CSS3, websites can <b>finally</b> use fonts other than the pre-selected "web-safe" fonts.
</div>
<p><b>Note:</b> Internet Explorer 8 and earlier, do not support the @font-face rule.</p>
</body>
</html>
ﻭﻳﻈﻬﺮ ﻓﻰ ﺍﻟﻤﺴﺘﻌﺮﺽ ﻛﻤﺎ ﻳﻠﻰ
ﺷﺮﺡ ﺍﻟﻜﻮﺩ:-
-4ﺍﻟﺴﻄﺮﺍﻥ ﺍﻟﺜﺎﻟﺚ ﻭﺍﻟﺮﺍﺑﻊ ﻏﻴﺮ ﺃﺳﺎﺳﻴﺎﻥ ،ﻭﻟﻜﻦ ﺳﻨﺤﺘﺎﺟﻬﻤﺎ ﺇﺫﺍ ﺃﺭﺩﻧﺎ ﺃﻥ ﻧﺪﺭﺝ
ﺃﻛﺜﺮ ﻣﻦ ﻭﺯﻥ ﻭﺗﻨﺴﻴﻖ ﻟﻠﺨﻂ ﺍﻟﻮﺍﺣﺪ ،ﻓﺎﻟﺴﻄﺮ ﺍﻷﻭﻝ ﻫﻮ ﻭﺯﻥ ﺍﻟﺨﻂ ،ﻭ 400
ﺗﻌﻨﻲ ﻋﺎﺩﻱ )ﻭﻛﺬﻟﻚ 700ﺗﻌﻨﻲ ﺳﻤﻴﻚ ﻭ 300ﺗﻌﻨﻲ ﺧﻔﻴﻒ)
ﻭﺑﻬﺫﺍ ﻧﻛﻭﻥ ﻗﺩ ﺍﻧﺗﻬﻳﻧﺎ ﻣﻥ ﺛﺎﻣﻥ ﻣﻛﻭﻥ ﺍﻭ ﺍﺿﺎﻓﺔ ﺟﺩﻳﺩﺓ ﻓﻰ ﻟﻐﺔ ﺍﻟـــ CSS3
ﺗﺎﺳﻌﺎ :ﺍﻟﺗﺣﻭﻳﻼﺕ ﺛﻧﺎﺋﻳﺔ ﺍﻷﺑﻌﺎﺩ CSS 2D Transforms
ﻣﻦ ﺑﻴﻦ ﺍﻟﻮﺣﺪﺍﺕ ﺍﻟﺘﻲ ﺃﺿﺎﻓﺘﻬﺎ css3ﻫﻲ ﺍﻟﺘﺤﻮﻳﻼﺕ ﺛﻨﺎﺋﻴﺔ ﺍﻷﺑﻌﺎﺩ .ﺑﻮﺍﺳﻄﺔ
ﺧﺎﺻﻴﺘﻴﻦ transformﻭ transform-originﻳﻤﻜﻨﻨﺎ ﺍﻟﺘﻼﻋﺐ ﺑﺈﺣﺪﺍﺛﻴﺎﺕ ﻋﻨﺼﺮ
ﻣﻦ ﻋﻨﺎﺻﺮ htmlﻋﻠﻰ ﻣﺤﻮﺭﻱ xﻭ yﺃﻓﻘﻴﺎ ﻭ ﻋﻤﻮﺩﻳﺎ .ﺗﺴﺘﻌﻤﻞ
ﺍﻟﺨﺎﺻﻴﺔ trasformﻣﺠﻤﻮﻋﺔ ﻣﻦ ﺍﻟﺪﻭﺍﻝ ،ﺗﺘﻴﺢ ﻟﻨﺎ ﺍﻟﺘﺄﺛﻴﺮ ﻋﻠﻰ ﺍﻟﻌﻨﺎﺻﺮ ،ﺇﺫ
ﻳﻤﻜﻨﻨﺎ ﺗﺤﺮﻳﻜﻬﺎ ،ﺗﻐﻴﻴﺮ ﻣﻘﺎﻳﻴﺲ ﺃﺑﻌﺎﺩﻫﺎ ،ﺗﻐﻴﻴﺮ ﺩﺭﺟﺔ ﺍﻹﻧﺤﺮﺍﻑ ،ﺍﻟﺪﻭﺭﺍﻥ ﻭ ﺗﻐﻴﻴﺮ
ﺣﺠﻤﻬﺎ .
ﺳﻨﺘﻌﺮﻑ ﻓﻲ ﻫﺬﺍ ﺍﻟﻤﻮﺿﻮﻉ ﻋﻠﻰ ﺍﻟﺪﻭﺍﻝ ﺛﻨﺎﺋﻴﺔ ﺍﻷﺑﻌﺎﺩ .ﻗﺒﻞ ﺫﻟﻚ ﻟﻨﻠﻘﻲ ﻧﻈﺮﺓ ﻋﻠﻰ
ﺍﻟﻤﺘﺼﻔﺤﺎﺕ ﺍﻟﺘﻲ ﺗﺪﻋﻢ ﺍﻟﺨﺎﺻﻴﺘﻴﻦ ﻭﺍﻟﻤﻮﺿﺤﺔ ﺑﺎﻟﺸﻜﻞ ﺍﻟﺘﺎﻟﻰ :
ﺍﻻﻥ ﺳﻮﻑ ﻧﻘﻮﻡ ﺑﺎﻟﺒﺪء ﻓﻰ ﺷﺮﺡ ﺍﻟﺪﻭﺍﻝ ﺍﻟﺘﻲ ﺗﺘﻤﺎﺷﻰ ﻣﻊ ﺍﻟﺨﺎﺻﻴﺔtransform :
ﻭﺍﻟﺪﻭﺍﻝ ﻫﻰ :
)(• translate
• )(rotate
• )(scale
• )(skewX
• )(skewY
• )(matrix
transform: translate(30px,50px)
:ﺃﻋﻄﻴﻜﻢ ﺑﻌﺾ ﺍﻷﻣﺜﻠﺔ
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
.box,.moved{width:160px;height:80px;background:rgba(138,200,15,0.7);border:1px solid
#78af03;color:#fff}
.box{border:1px dashed gray;background:#e7f1d2;margin-bottom: 30px;}
.translationXY {
-ms-transform: translateX(30px) translateY(15px);
-moz-transform: translateX(30px) translateY(15px);
-webkit-transform:translateX(30px) translateY(15px);
-o-transform: translateX(30px) translateY(15px);
transform: translateX(30px) translateY(15px);
}
.translationX {
-ms-transform: translateX(30px);
-moz-transform: translateX(30px);
-webkit-transform:translateX(30px);
-o-transform: translateX(30px);
transform: translateX(30px);
}
.translationY {
-ms-transform: translateY(15px);
-moz-transform: translateY(15px);
-webkit-transform:translateY(15px);
-o-transform: translateY(15px);
transform: translateY(15px);
}
</style>
</head>
<body>
<h1>CSS3 translateX AND translateY</h1>
<div class="box">
<div class="translationXY moved">translateX(30px) translateY(15px)</div>
</div>
<div class="box">
<div class="translationX moved">translateX(30px)</div>
</div>
<div class="box">
<div class="translationY moved">translateY(15px)</div>
</div>
</body>
</html>
ﺛﺎﻧﻴﺎ :ﺍﻟﺪﺍﻟﺔ )rotate(deg
ﺗﻴﺢ ﻫﺬﻩ ﺍﻟﺪﺍﻟﺔ ﺩﻭﺭﺍﻥ ﺍﻟﻌﻨﺼﺮ ،ﻧﻌﻄﻴﻬﺎ ﺍﻟﻘﻴﻤﺔ ﺑﻌﺪﺩ ﺍﻟﺪﺭﺟﺎﺕ (degre) .ﻳﻤﻜﻦ
ﻟﻠﻘﻴﻤﺔ ﺃﻥ ﺗﻜﻮﻥ ﺳﻠﺒﻴﺔ ﺃﻭ ﺇﻳﺠﺎﺑﻴﺔ ،ﻛﻤﺎ ﻳﻤﻜﻨﻨﺎ ﺇﻋﻄﺎء ﻗﻴﻤﺔ ﺃﻛﺒﺮ ﻣﻦ 360°ﺩﺭﺟﺔ .
ﻣﺜﻼ 400°ﺩﺭﺟﺔ ﺳﺘﻌﻄﻴﻨﺎ 40°ﺩﺭﺟﺔ ﻓﻘﻂ .ﺣﺎﻟﻴﺎ ﻻ ﻳﻬﻢ ﺇﻥ ﻛﺘﺒﺘﻢ 400°ﺃﻭ 40°
ﺩﺭﺟﺔ ﻓﺎﻷﻣﺮ ﻻ ﻳﺨﺘﻠﻒ .ﻟﻜﻦ ﺃﺛﻨﺎء ﺗﻨﺸﻴﻂ ﺍﻟﻌﻨﺎﺻﺮ ﻣﻌﻨﻰ 400°ﺩﺭﺟﺔ ﺳﻴﺨﺘﻠﻒ
ﺗﻤﺎﻣﺎ ﻭ ﺳﻴﻌﻨﻲ ﺃﻥ ﺍﻟﻌﻨﺼﺮ ﺳﻴﻘﻮﻡ ﺑﺪﻭﺭﺓ ﻛﺎﻣﻠﺔ ﺣﻮﻝ ﺍﻟﻨﻘﻄﺔ ﺍﻷﺻﻠﻴﺔ ) (360°ﺛﻢ
ﻳﻀﻴﻒ 40°ﺩﺭﺟﺔ ،ﺳﻮﻑ ﻧﺘﻨﺎﻭﻝ ﻣﺜﺎﻝ ﻋﻠﻰ ﻫﺬﺓ ﺍﻟﺪﺍﻟﻪ :
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
body{width:50%;}
.mydiv{width:100px;height:100px;background:#8ac805;border:1px solid
gray;color:#fff;float:left;}p{border-bottom:2px solid black;padding-bottom:25px;}
.rotation {
-ms-transform: rotate(20deg);
-webkit-transform: rotate(20deg);
-moz-transform: rotate(20deg);
-o-transform: rotate(20deg);
transform: rotate(20deg);
}
</style>
</head>
<body>
<h1>CSS3 2D Rotate</h1>
<div class="mydiv"><ﺍﻟﻣﻛﺎﻥ ﺍﻷﺻﻠﻲ/div><p>flammekueche kuglopf Salu bissame Hans turpis météor
Heineken turpis, so quam. amet, gewurztraminer ch'ai ac sit Salut isamme suspendisse adipiscing
porta schneck hopla Huguette schpeck et Racing. blottkopf, Gal ! libero, merci vielmols salu hopla
Oberschaeffolsheim quam, placerat ornare geht's ac wie amet tristique mamsell wurscht</p><div
style="clear:both;"></div>
<div class="rotation mydiv">rotate(20deg)</div><p>flammekueche kuglopf Salu bissame Hans
turpis météor Heineken turpis, so quam. amet, gewurztraminer ch'ai ac sit Salut bisamme
suspendisse adipiscing porta schneck hopla Huguette schpeck et Racing. blottkopf, Gal ! libero,
merci vielmols salu hopla Oberschaeffolsheim quam, placerat ornare geht's ac wie amet tristique
mamsell wurscht</p>
</body>
</html>
ﻭﻳﻈﻬﺮ ﺑﺎﻟﻤﺴﺘﻌﺮﺽ ﺑﻬﺬﺓ ﺍﻟﻄﺮﻳﻘﺔ
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
.mydiv{width:150px;height:100px;background:#8ac805;border:1px solid green;color:#fff;margin:0
0 50px 20px;}
.oblique {
-ms-transform: skew(15deg ,30deg);
-webkit-transform: skew(15deg ,30deg);
-moz-transform: skew(15deg ,30deg);
-o-transform: skew(15deg ,30deg);
transform: skew(15deg ,30deg);
}
</style>
</head>
<body>
<h1>CSS3 2D Skew</h1>
<div class="mydiv"><ﺍﻟﺣﺟﻡ ﺍﻷﺻﻠﻲ/div>
<div class="mydiv oblique"> skew(15deg ,30deg)</div>
</body>
</html>
ﺍﻟﺪﺍﻟﺘﺎﻥ skewXﻭskewY
ﺍﻟﺪﺍﻟﺘﺎﻥ ﻣﺸﺘﻘﺘﺎﻥ ﻣﻦ ﺍﻟﺪﺍﻟﺔ skew() .ﺑﻄﺒﻴﻌﺔ ﺍﻟﺤﺎﻝ ،ﻛﻞ ﺩﺍﻟﺔ ﺳﺘﺄﺧﺬ ﻗﻴﻤﺔ ﻭﺍﺣﺪﺓ
ﻓﻘﻂ ،ﻣﺜﻼ ﺇﺫﺍ ﺃﺭﺩﻧﺎ ﺃﻥ ﻳﻤﻴﻞ ﺍﻟﻌﻨﺼﺮ 15°ﺩﺭﺟﺔ ﺣﻮﻝ ﻣﺤﻮﺭ X
)transform: skewX(15deg
ﻫﺬﻩ ﺍﻟﺪﺍﻟﺔ ﻋﺒﺎﺭﺓ ﻋﻦ ﻣﺼﻔﻮﻓﺔ ﺗﺠﻤﻊ ﺑﻴﻦ ﻭﻅﺎﺋﻒ ﻛﻞ ﺍﻟﺪﻭﺍﻝ ﺍﻷﺧﺮﻯ ،ﻣﻦ ﺗﺤﺮﻳﻚ ﻭ
ﻣﻴﻼﻥ ﻭ ﺩﻭﺭﺍﻥ ﻭ ﺗﻐﻴﻴﺮ ﺍﻟﺤﺠﻢ ﻭ ﻧﻌﻄﻴﻬﺎ 6ﻗﻴﻢ .ﻟﺴﻮء ﺍﻟﺤﻆ ﺃﻥ ﺍﻟﺪﺍﻟﺔ ﺗﺴﺘﻌﻤﻞ
ﺣﺴﺎﺑﺎﺕ ﺭﻳﺎﺿﻴﺔ ﻣﻌﻘﺪﺓ ﻭ ﻟﻴﺴﺖ ﻓﻲ ﻣﺴﺘﻮﻯ ﺍﻟﺠﻤﻴﻊ .ﺑﺎﻟﻨﺴﺒﺔ ﻟﻠﻤﻌﻠﻤﻴﻴﻦ ﻳﻤﻜﻨﻜﻢ
ﺍﻹﻁﻼﻉ ﻋﻠﻰ ﻫﺬﺍ ﺍﻟﺮﺍﺑﻂ ﻟﻔﻬﻢ ﻁﺮﻳﻘﺔ ﺗﻮﻅﻴﻒ ﺍﻟﻤﺼﻔﻮﻓﺎﺕ ﻓﻲ ﻟﻐﺔ" css33ﺍﻟﻤﻘﺎﻝ
ﺑﺎﻟﻠﻐﺔ ﺍﻹﻧﺠﻠﻴﺰﻳﺔ"
ﺳﻨﻘﺘﺼﺮ ﺣﺎﻟﻴﺎ ﻋﻠﻰ ﺍﻟﻤﺜﺎﻝ ﺍﻟﺘﺎﻟﻲ :
ﻟﻨﻔﺘﺮﺽ ﺃﻧﻨﺎ ﻧﺮﻳﺪ ﺇﺟﺮﺍء ﻣﺠﻤﻮﻋﺔ ﻣﻦ ﺍﻟﺘﺤﻮﻳﻼﺕ ﺍﻟﺘﻲ ﺭﺃﻳﻨﺎﻫﺎ ،ﺩﻓﻌﺔ ﻭﺍﺣﺪﺓ:
ﻭ ﻫﻲ ﺗﻌﺎﺩﻝ :
;transform-origin: 50% 50%
ﻭﺑﻬﺫﺍ ﻧﻛﻭﻥ ﻗﺩ ﺍﻧﺗﻬﻳﻧﺎ ﻣﻥ ﺗﺎﺳﻊ ﻣﻛﻭﻥ ﺍﻭ ﺍﺿﺎﻓﺔ ﺟﺩﻳﺩﺓ ﻓﻰ ﻟﻐﺔ ﺍﻟـــ CSS3
ﻋﺎﺷﺭﺍ :ﺍﻟﺗﺣﻭﻳﻼﺕ ﺛﻼﺛﻳﺔ ﺍﻷﺑﻌﺎﺩ CSS 3D Transforms
ﺗﻌﺎﻣﻠﻨﺎ ﻓﻲ ﺍﻟﺪﺭﺱ ﺍﻟﺴﺎﺑﻖ ﻣﻊ ﺍﻟﺘﺤﻮﻳﻼﺕ ﺛﻨﺎﺋﻴﺔ ﺍﻷﺑﻌﺎﺩ ،ﻭ ﺍﻟﺘﻲ ﺗﺮﺗﻜﺰ ﻋﻠﻰ ﻣﺤﻮﺭﻳﻦ
،ﻣﺤﻮﺭ ﺍﻟﻌﺮﺽ " "Xﻭ ﻣﺤﻮﺭ ﺍﻟﻄﻮﻝ "Y" .ﻟﺘﺤﻮﻳﻞ ﺍﻟﻌﻨﺎﺻﺮ ﻓﻲ ﻓﻀﺎء ﺛﻼﺛﻲ
ﺍﻷﺑﻌﺎﺩ ،ﺳﻨﻀﻴﻒ ﻣﺤﻮﺭﺍ ﺛﺎﻟﺜﺎ ،ﻭ ﻫﻮ ﻣﺤﻮﺭ " "Zﺍﻟﺬﻱ ﻳﻤﻨﺤﻨﺎ ﺍﻟﺘﺤﻜﻢ ﻓﻲ ﻋﻤﻖ
ﺍﻟﻌﻨﺎﺻﺮ ﻛﻤﺎ ﻓﻲ ﻁﻮﻟﻬﺎ ﻭﻋﺮﺿﻬﺎ.
ﻓﻲ ﻣﺠﺎﻝ ﺍﻟﻮﻳﺐ ،ﺃﻟﻔﻨﺎ ﺍﻹﺷﺘﻐﺎﻝ ﻓﻲ ﻓﻀﺎء ﺛﻨﺎﺋﻲ ﺍﻷﺑﻌﺎﺩ .ﺣﻴﺚ ﺃﻱ ﺻﻔﺤﺔ ﻣﻤﺜﻠﺔ
ﺑﻤﺤﻮﺭﻳﻦ ،ﻣﺤﻮﺭ Xﺍﻷﻓﻘﻲ ﻭ ﻣﺤﻮﺭ Yﺍﻟﻌﻤﻮﺩﻱ .ﺍﻟﻨﻘﻄﺔ ﺍﻷﺻﻠﻴﺔ ﺍﻟﺘﻲ ﺗﻤﺜﻞ
ﺗﻘﺎﻁﻊ ﺍﻟﻤﺤﻮﺭﻳﻦ ﻣﺒﺪﺋﻴﺎ ﺗﻮﺟﺪ ﺃﻋﻠﻰ ﻳﺴﺎﺭ ﺍﻟﺼﻔﺤﺔ .ﺇﺫﺍ ﺣﺮﻛﻨﺎ ﺍﻟﻌﻨﺎﺻﺮ ﺇﻟﻰ ﺍﻟﻴﺴﺎﺭ
ﻓﻬﻲ ﺗﺄﺧﺬ ﻗﻴﻤﺎ ﺳﻠﺒﻴﺔ ﻭ ﻗﻴﻤﺎ ﺇﻳﺠﺎﺑﻴﺔ ﻋﻠﻰ ﻳﻤﻴﻦ ﻣﺤﻮﺭ X .ﻧﻔﺲ ﺍﻟﺸﻲء ﻋﻠﻰ ﻣﺤﻮﺭ
،Yﺍﻟﺘﺤﺮﻙ ﺇﻟﻰ ﺃﻋﻠﻰ ﻳﺄﺧﺬ ﻗﻴﻤﺎ ﺳﻠﺒﻴﺔ ﻭ ﺇﻳﺠﺎﺑﻴﺔ ﺇﻟﻰ ﺃﺳﻔﻞ ﺍﻟﺼﻔﺤﺔ .ﺑﺎﻟﻨﺴﺒﺔ
ﻟﻠﻔﻀﺎء ﺍﻟﺜﻼﺛﻲ ﺍﻷﺑﻌﺎﺩ ،ﻭ ﺍﻟ ُﻤﻤﺜّﻞ ﺑﺎﻟﻤﺤﻮﺭ Z .ﻫﺬﺍ ﺍﻟﻤﺤﻮﺭ ﻳﻤﺜﻞ ﻣﺴﻄﺤﺎ ﻳﺘﺠﻪ ﻧﺤﻮ
ﺍﻟﻤﺸﺎﻫﺪ ،ﻭ ﻳﻤﺜﻞ ﺍﻟﻌﻤﻖ ،ﺍﻟﻘﻴﻢ ﺍﻹﻳﺠﺎﺑﻴﺔ ﺗُﺤﺮﻙ ﺍﻟﻌﻨﺼﺮ ﻓﻲ ﺍﺗﺠﺎﻫﻜﻢ ﻭ ﺗﺠﻌﻠﻪ ﺃﻗﺮﺏ
ﺇﻟﻴﻜﻢ ﻭ ﺍﻟﺴﻠﺒﻴﺔ ﺗﺤﺮﻛﻪ ﺑﻌﻴﺪﺍ ﻋﻨﻜﻢ.
ﺳﻨﺘﻌﺮﻑ ﻓﻲ ﻫﺬﺍ ﺍﻟﻤﻮﺿﻮﻉ ﻋﻠﻰ ﻣﺠﻤﻮﻋﺔ ﻣﻦ ﺍﻟﺨﺎﺻﻴﺎﺕ ﺍﻟﺠﺪﻳﺪﺓ .ﻗﺒﻞ ﺫﻟﻚ ﻟﻨﻠﻘﻲ
ﻧﻈﺮﺓ ﻋﻠﻰ ﺍﻟﻤﺘﺼﻔﺤﺎﺕ ﺍﻟﺘﻲ ﺗﺪﻋﻢ ﺫﻟﻚ ﺍﻻﺿﺎﻓﺔ ﺍﻟﺠﺪﻳﺪﺓ ﻭﺍﻟﻤﻮﺿﺤﺔ ﺑﺎﻟﺸﻜﻞ ﺍﻟﺘﺎﻟﻰ :
)(rotateX •
)(rotateY •
)(rotateZ •
)(scaleZ •
)(translateZ •
ﺍﻭﻻ :ﺍﻟﺪﺍﻟﺔ )rotateX(a
ﺗﺘﻴﺢ ﺍﻟﺪﺍﻟﺔ )( rotateXﺩﻭﺭﺍﻥ ﺍﻟﻌﻨﺼﺮ ﺣﻮﻝ ﺍﻟﻤﺤﻮﺭ ﺍﻟﺴﻴﻨﻲ " "Xﺑﺪﻭﻥ ﺍﻟﺘﺄﺛﻴﺮ
ﻋﻠﻰ ﺣﺠﻤﻪ .ﺗﺤﺪﺩ ﺍﻟﻘﻴﻤﺔ ﺑﺪﺭﺟﺔ ﺯﺍﻭﻳﺔ ﺍﻟﺪﻭﺭﺍﻥ .ﺇﺫﺍ ﻛﺎﻧﺖ ﺍﻟﻘﻴﻤﺔ ﺇﻳﺠﺎﺑﻴﺔ ﻳﺘﻢ
ﺍﻟﺪﻭﺭﺍﻥ ﻓﻲ ﺍﺗﺠﺎﻩ ﻋﻘﺎﺭﺏ ﺍﻟﺴﺎﻋﺔ ،ﻭ ﺍﻟﻌﻜﺲ ﺇﺫﺍ ﻛﺎﻧﺖ ﺳﻠﺒﻴﺔ.
ﻣﻜﺎﻥ ﺃﻭ ﻧﻘﻄﺔ ﺍﻟﺪﻭﺭﺍﻥ ﻳﺘﻢ ﺗﺤﺪﻳﺪﻫﺎ ﺑﺎﺳﺘﻌﻤﺎﻝ ﺍﻟﺨﺎﺻﻴﺔtransform-origin
.box,.rotation{width:200px;height:200px;background:rgba(138,200,15,0.8)
;border:1px solid #79af03;}
.box{border:1px dashed gray;background:#e9f1d7;}
.rotation-x:hover {
-webkit-transform:rotateX(140deg);
-moz-transform: rotateX(140deg);
transform: rotateX(140deg);
}
</style>
</head>
<body>
<h1>CSS3 3D RotateX</h1>
<div class="box">
<div class="rotation rotation-x">rotateX(140deg) <h3> ﺿﻊ ﻣﺅﺷﺭ ﺍﻟﻔﺄﺭﺓ
ﻋﻠﻰ ﺍﻟﻌﻧﺻﺭ ﻭ ﺳﻳﺩﻭﺭ140 ﺩﺭﺟﺔ ﺣﻭﻝ ﻣﺣﻭﺭX </h3> </div>
</div>
</body>
</html>
ﺩﺍﺧﻞ ﺍﻟﻤﺴﺘﻌﺮﺽ ﺿﻊ ﻣﺆﺷﺮ ﺍﻟﻔﺄﺭﺓ ﻋﻠﻰ ﺍﻟﻌﻨﺼﺮ ﻭ ﺳﻴﺪﻭﺭ 140ﺩﺭﺟﺔ ﺣﻮﻝ
ﻣﺤﻮﺭ X
ﺗﺘﻴﺢ ﺍﻟﺪﺍﻟﺔ )( rotateYﺩﻭﺭﺍﻥ ﺍﻟﻌﻨﺼﺮ ﺣﻮﻝ ﺍﻟﻤﺤﻮﺭ ﺍﻟﺼﺎﺩﻱ " "Yﺑﺪﻭﻥ ﺍﻟﺘﺄﺛﻴﺮ
ﻋﻠﻰ ﺣﺠﻤﻪ .ﺗﺤﺪﺩ ﺍﻟﻘﻴﻤﺔ ﺑﺪﺭﺟﺔ ﺯﺍﻭﻳﺔ ﺍﻟﺪﻭﺭﺍﻥ .ﺇﺫﺍ ﻛﺎﻧﺖ ﺍﻟﻘﻴﻤﺔ ﺇﻳﺠﺎﺑﻴﺔ ﻳﺘﻢ
ﺍﻟﺪﻭﺭﺍﻥ ﻓﻲ ﺍﺗﺠﺎﻩ ﻋﻘﺎﺭﺏ ﺍﻟﺴﺎﻋﺔ ،ﻭ ﺍﻟﻌﻜﺲ ﺇﺫﺍ ﻛﺎﻧﺖ ﺳﻠﺒﻴﺔ.
ﻣﻜﺎﻥ ﺃﻭ ﻧﻘﻄﺔ ﺍﻟﺪﻭﺭﺍﻥ ﻳﺘﻢ ﺗﺤﺪﻳﺪﻫﺎ ﺑﺎﺳﺘﻌﻤﺎﻝ ﺍﻟﺨﺎﺻﻴﺔtransform-origin
.box,.rotation{width:200px;height:200px;background:rgba(138,200,15,0.8)
;border:1px solid #79af03;}
.box{border:1px dashed gray;background:#e9f1d7;}
.rotation-y:hover {
-webkit-transform:rotateY(140deg);
-moz-transform: rotateY(140deg);
transform: rotateY(140deg);
}
</style>
</head>
<body>
<h1>CSS3 3D RotateY</h1>
<div class="box">
<div class="rotation rotation-y">rotateY(140deg) <h3> ﺿﻊ ﻣﺅﺷﺭ ﺍﻟﻔﺄﺭﺓ
ﻋﻠﻰ ﺍﻟﻌﻧﺻﺭ ﻭ ﺳﻳﺩﻭﺭ140 ﺩﺭﺟﺔ ﺣﻭﻝ ﻣﺣﻭﺭY </h3> </div>
</div>
</body>
</html>
ﺿﻊ ﻣﺆﺷﺮ ﺍﻟﻔﺄﺭﺓ ﻋﻠﻰ ﺍﻟﻌﻨﺼﺮ ﻭ ﺳﻴﺪﻭﺭ 140ﺩﺭﺟﺔ ﺣﻮﻝ ﻣﺤﻮﺭ Y
ﺗﺘﻴﺢ ﺍﻟﺪﺍﻟﺔ )( rotateZﺩﻭﺭﺍﻥ ﺍﻟﻌﻨﺼﺮ ﺣﻮﻝ ﻣﺤﻮﺭ " "Zﺑﺪﻭﻥ ﺍﻟﺘﺄﺛﻴﺮ ﻋﻠﻰ ﺣﺠﻤﻪ .
ﺗﺤﺪﺩ ﺍﻟﻘﻴﻤﺔ ﺑﺪﺭﺟﺔ ﺯﺍﻭﻳﺔ ﺍﻟﺪﻭﺭﺍﻥ .ﺇﺫﺍ ﻛﺎﻧﺖ ﺍﻟﻘﻴﻤﺔ ﺇﻳﺠﺎﺑﻴﺔ ﻳﺘﻢ ﺍﻟﺪﻭﺭﺍﻥ ﻓﻲ ﺍﺗﺠﺎﻩ
ﻋﻘﺎﺭﺏ ﺍﻟﺴﺎﻋﺔ ،ﻭ ﺍﻟﻌﻜﺲ ﺇﺫﺍ ﻛﺎﻧﺖ ﺳﻠﺒﻴﺔ.
ﻣﻜﺎﻥ ﺃﻭ ﻧﻘﻄﺔ ﺍﻟﺪﻭﺭﺍﻥ ﻳﺘﻢ ﺗﺤﺪﻳﺪﻫﺎ ﺑﺎﺳﺘﻌﻤﺎﻝ ﺍﻟﺨﺎﺻﻴﺔtransform-origin
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
h3 {direction:rtl;}
.box,.rotation{width:200px;height:200px;background:rgba(138,200,15,0.8)
;border:1px solid #79af03;}
.box{border:1px dashed gray;background:#e9f1d7;}
.rotation-z:hover {
-webkit-transform:rotateZ(140deg);
-moz-transform: rotateZ(140deg);
transform: rotateZ(140deg);
}
</style>
</head>
<body>
<h1>CSS3 3D RotateZ</h1>
<div class="box">
<div class="rotation rotation-z">rotateZ(140deg) <h3> ﺿﻊ ﻣﺅﺷﺭ ﺍﻟﻔﺄﺭﺓ
ﻋﻠﻰ ﺍﻟﻌﻧﺻﺭ ﻭ ﺳﻳﺩﻭﺭ140 ﺩﺭﺟﺔ ﺣﻭﻝ ﻣﺣﻭﺭZ </h3> </div>
</div>
</body>
</html>
ﺿﻊ ﻣﺆﺷﺮ ﺍﻟﻔﺄﺭﺓ ﻋﻠﻰ ﺍﻟﻌﻨﺼﺮ ﻭ ﺳﻴﺪﻭﺭ 140ﺩﺭﺟﺔ ﺣﻮﻝ ﻣﺤﻮﺭ Z
ﺗﺘﻴﺢ ﺍﻟﺪﺍﻟﺔ )( rotate3dﺩﻭﺭﺍﻥ ﺍﻟﻌﻨﺼﺮ ﺣﻮﻝ ﻣﺤﻮﺭ ُﻣﺤ ّﺪﺩ ﺑﺪﻭﻥ ﺍﻟﺘﺄﺛﻴﺮ ﻋﻠﻰ ﺣﺠﻤﻪ
.ﺗﺤﺪﺩ ﺍﻟﻘﻴﻤﺔ ﺑﺪﺭﺟﺔ ﺯﺍﻭﻳﺔ ﺍﻟﺪﻭﺭﺍﻥ .ﺇﺫﺍ ﻛﺎﻧﺖ ﺍﻟﻘﻴﻤﺔ ﺇﻳﺠﺎﺑﻴﺔ ﻳﺘﻢ ﺍﻟﺪﻭﺭﺍﻥ ﻓﻲ ﺍﺗﺠﺎﻩ
ﻋﻘﺎﺭﺏ ﺍﻟﺴﺎﻋﺔ ،ﻭ ﺍﻟﻌﻜﺲ ﺇﺫﺍ ﻛﺎﻧﺖ ﺳﻠﺒﻴﺔ.
ﻓﻲ ﻓﻀﺎء ﺛﻼﺛﻲ ﺍﻷﺑﻌﺎﺩ ،ﻳﻤﻜﻦ ﺗﺤﺪﻳﺪ ﻣﺤﻮﺭ ﺍﻟﺪﻭﺭﺍﻥ ﺑﺎﻹﻋﺘﻤﺎﺩ ﻋﻠﻰ ﻗﻴﻢ
ﺍﻟﻤﺘﺠﻬﺎﺕ ] ، a[x,y,zﻧﻘﻄﺔ ﺍﻟﺪﻭﺭﺍﻥ ﻳﺘﻢ ﺗﺤﺪﻳﺪﻫﺎ ﺑﺎﺳﺘﻌﻤﺎﻝ ﺍﻟﺨﺎﺻﻴﺔtransform-
origin
: xﺗُﺤ ّﺪﺩ ﺇﺣﺪﺍﺛﻴﺎﺕ xﻟﻠﻤﺘﺠﻪ ﺍﻟﺬﻱ ﻳﻤﺜﻞ ﻣﺤﻮﺭ ﺍﻟﺪﻭﺭﺍﻥ
: yﺗُﺤ ّﺪﺩ ﺇﺣﺪﺍﺛﻴﺎﺕ yﻟﻠﻤﺘﺠﻪ ﺍﻟﺬﻱ ﻳﻤﺜﻞ ﻣﺤﻮﺭ ﺍﻟﺪﻭﺭﺍﻥ
: zﺗُﺤ ّﺪﺩ ﺇﺣﺪﺍﺛﻴﺎﺕ zﻟﻠﻤﺘﺠﻪ ﺍﻟﺬﻱ ﻳﻤﺜﻞ ﻣﺤﻮﺭ ﺍﻟﺪﻭﺭﺍﻥ
: aﺗﻤﺜﻞ ﺩﺭﺟﺔ ﺯﺍﻭﻳﺔ ﺍﻟ ّﺪﻭﺭﺍﻥ.
ﻣﺜﻼ :
)rotateX(80degﻫﻲ ﺍﺧﺘﺰﺍﻝ)rotate3d(1,0,0,80deg
)rotateY(80degﻫﻲ ﺍﺧﺘﺰﺍﻝ)rotate3d(0,1,0,80deg
)rotateZ(80degﻫﻲ ﺍﺧﺘﺰﺍﻝ)rotate3d(0,0,1,80deg
ﻟﻠﺠﻤﻊ ﺑﻴﻦ ﺍﻟﺪﻭﺍﻝ ﺍﻟﺜﻼﺙ ﻓﻲ ﺩﺍﻟﺔ )( rotate3dﻳﺠﺐ ﺍﺳﺘﻌﻤﺎﻝ ﺍﻟﻤﺼﻔﻮﻓﺎﺕ ،ﻟﻠﺬﻳﻦ
ﻟﻢ ﻳﺪﺭﺳﻮﺍ ﺍﻟﻤﺼﻔﻮﻓﺎﺕ ﻓﻲ ﻣﺎﺩﺓ ﺍﻟﺮﻳﺎﺿﻴﺎﺕ ،ﻳﻤﻜﻨﻜﻢ ﻧﺴﻴﺎﻥ ﺍﻷﻣﺮ ﻭ ﺗﺮﻙ ﻫﺬﻩ ﺍﻟﺪﺍﻟﺔ
ﺟﺎﻧﺒﺎ ،
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
.box,.rotation{width:200px;height:200px;background:rgba(138,200,15,0.8)
;border:1px solid #79af03;}
.box{border:1px dashed gray;background:#e9f1d7;}
.rotation-3d {
-webkit-transform:rotate3d(0.7, 0.5, 0.7, 80deg);
-moz-transform: rotate3d(0.7, 0.5, 0.7, 80deg);
transform: rotate3d(0.7, 0.5, 0.7, 80deg);
}
</style>
</head>
<body>
<h1>CSS3 Rotate3d</h1>
<div class="box">
<div class="rotation rotation-3d"><h3>rotate3d(0.7, 0.5, 0.7,
80deg)</h3></div>
</div>
</body>
</html>
ﺧﺎﻣﺴﺎ :ﺍﻟﺪﺍﻟﺔ )(translate3d
ﺍﻟﺪﺍﻟﺔ )(scale3d
ﺭﺃﻳﻨﺎ ﻓﻲ ﺍﻟﺪﺭﺱ ﺍﻟﺴﺎﺑﻖ ﺃﻥ ﺍﻟﺪﺍﻟﺘﻴﻦ scaleXﻭ scaleYﺗﺄﺛﺮﺍﻥ ﻋﻠﻰ ﺣﺠﻢ ﺍﻟﻌﻨﺼﺮ
،ﺑﺘﻜﺒﻴﺮﻩ ﺃﻭ ﺗﺼﻐﻴﺮﻩ ،ﻣﺜﻼ ﺇﺫﺍ ﻛﺎﻥ ﻟﺪﻳﻨﺎ ﻋﻨﺼﺮ ﺑﻌﺮﺽ 100pxﻭ ﻁﺒﻘﻨﺎ
ﻋﻠﻴﻪ ) scaleX(2ﺳﻴﺼﺒﺢ ﺑﻌﺮﺽ200px.
ﺑﺎﻟﻨﺴﺒﺔ ﻟﻠﺪﺍﻟﺔ ، scaleZﺗﻌﻄﻴﻨﺎ ﺗﺼﺮﻓﺎ ﻣﺨﺘﻠﻔﺎ ﻧﻮﻋﺎ ﻣﺎ ،ﻣﺎ ﺩﻣﻨﺎ ﻧﺸﺘﻐﻞ ﻓﻲ ﻓﻀﺎء
ﺛﻨﺎﺋﻲ ﺍﻷﺑﻌﺎﺩ ﻟﻴﺲ ﻟﻪ ﺃﻱ ﻋﻤﻖ ،ﺭﻏﻢ ﺃﻧﻬﺎ ﺩﺍﻟﺔ ﺛﻼﺛﻴﺔ ﺍﻷﺑﻌﺎﺩ ﺇﻻ ﺃﻧﻬﺎ ﺗﺘﺼﺮﻑ ﺗﻘﺮﻳﺒﺎ
ﻣﺜﻞ translateZ .ﺇﺫ ﺗﻈﻬﺮ ﻟﻨﺎ ﻛﺄﻧﻬﺎ ﺗﻘﻮﻡ ﺑﺘﺤﺮﻳﻚ ﺍﻟﻌﻨﺼﺮ ﻋﻠﻰ ﻣﺤﻮﺭ Z .
ﻳﻤﻜﻨﻨﺎ ﺟﻤﻊ ﻗﻴﻢ scaleﻓﻲ ﺩﺍﻟﺔ ﻣﺨﺘﺼﺮﺓ ﻭ ﻫﻲ scale3d .ﻓﻲ ﺍﻟﻤﺜﺎﻝ ﺃﺳﻔﻠﻪ ﻧﻔﺲ
ﺍﻟﺘﺄﺛﻴﺮ ﺳﻴﻄﺒﻖ ﻋﻠﻰ ﺍﻟﻌﻨﺼﺮﻳﻦ div1ﻭdiv2
{ .div1
;)transform: scaleX(2) scaleY(1.5) scaleZ(0.75
}
{ .div2
;)transform: scale3d(2,1.5,0.75
}
CSS3 Perspective
ﻟﺘﻔﻌﻴﻞ ﺍﻟﻔﻀﺎء ﺍﻟﺜﻼﺛﻲ ﺍﻷﺑﻌﺎﺩ ،ﻳﺤﺘﺎﺝ ﺍﻟﻌﻨﺼﺮ ﺇﻟﻰ ﻣﻨﻈﻮﺭperspective
ﻓﻲ ﻓﻀﺎء ﺛﻼﺛﻲ ﺍﻷﺑﻌﺎﺩ ،ﺗﻘﻮﻡ perspectiveﺑﺎﻟﺘﺄﺛﻴﺮ ﻋﻠﻰ ﺍﻟﻤﺴﺎﻓﺔ ﺍﻟﺘﻲ ﺗﻔﺼﻞ
ﺍﻟﻤﺸﺎﻫﺪ ﺑﺎﻟﻌﻨﺼﺮ ﺍﻟﺬﻱ ﻳﺮﺍﻩ .ﺃﻱ ﺑﻴﻦ ُﻣﺴﻄّﺢ ﺍﻟﻤﺴﺘﻮﻯ z=00ﻭ ﺍﻟﻤﺸﺎﻫﺪ .ﻛﻠﻤﺎ
ﻛﺎﻧﺖ ﺍﻟﻤﺴﺎﻓﺔ ﺃﻗﺮﺏ ﺇﻻ ﻭ ﺍﺯﺩﺍﺩﺕ ﺍﻟﺘﺄﺛﻴﺮﺍﺕ ﺍﻟﺒﺼﺮﻳﺔ .ﻭ ﻛﻠﻤﺎ ﺍﺑﺘﻌﺪ ﺍﻟﻤﺸﺎﻫﺪ ﻋﻦ
ﻣﺴﻄﺢ zﺇﻻ ﻭﻛﺎﻧﺖ ﺍﻟﻨﺘﺎﺋﺞ ﺧﺎﺩﻋﺔ .ﻣﺜﻼ ﺃﻱ ﻗﻴﻤﺔ ﺃﺩﻧﻰ ﻣﻦ 2000ﺑﻴﻜﺴﻞ ﺳﺘﻌﻄﻲ
ﺍﻟﻤﺸﺎﻫﺪ ﺗﺄﺛﻴﺮﺍﺕ ﺟﺪ ﺑﺎﺭﺯﺓ ،ﺃﻣﺎ ﺇﺫﺍ ﺑﺎﻟﻐﻨﺎ ﻓﻲ ﺭﻓﻊ ﺍﻟﻘﻴﻤﺔ ،ﻣﺜﻼ 900ﺑﻴﻜﺴﻞ ﺳﺘﺒﺪﻭ
ﺍﻟﻨﺘﺎﺋﺞ ﺃﻗﻞ ﺗﺄﺛﻴﺮﺍ .
ﻳﻤﻜﻨﻨﺎ ﺇﺿﺎﻓﺔ perspectiveﺑﻄﺮﻳﻘﺘﻴﻦ :ﺇﻣﺎ ﺍﺳﺘﻌﻤﺎﻟﻬﺎ ﻛﺪﺍﻟﺔ ﻣﻊ
ﺍﻟﺨﺎﺻﻴﺔtransform :
ﻣﺜﺎﻝ ...
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
.box,.rotation{width:200px;height:200px;background:rgba(138,200
,15,0.8);border:1px solid #79af03;}
.box{border:1px dashed gray;background:#e9f1d7;margin-
left:15px;}
.rotation-x {
-webkit-transform:perspective(200px) rotateX(45deg);
-moz-transform: perspective(200px) rotateX(45deg);
transform: perspective(200px) rotateX(45deg);
}
</style>
</head>
<body>
<h1>CSS3 transform perspective</h1>
<div class="box">
<div class="rotation rotation-x">perspective(200px)
rotateX(45deg)</div>
</div>
</body>
</html>
ﺃﻭ ﺍﺳﺘﻌﻤﺎﻟﻬﺎ ﻛﺨﺎﺻﻴﺔ ﻣﻨﻔﺮﺩﺓ
{ .parent
;perspective: 200px
}
{ .child
;)transform: rotateX(45deg
}
<div class="parent">
<div class="child"> 1 <ﺍﻟﻌﻨﺼﺮ ﺍﻹﺑﻦ/div>
<div class="child"> 2 <ﺍﻟﻌﻨﺼﺮ ﺍﻹﺑﻦ/div>
<div class="child"> 3 <ﺍﻟﻌﻨﺼﺮ ﺍﻹﺑﻦ/div>
<div class="child"> 4 <ﺍﻟﻌﻨﺼﺮ ﺍﻹﺑﻦ/div>
</div>
.parent {
-webkit-perspective:500px;
-moz-perspective: 500px;
perspective: 500px;
}
.child {
width:100px;height:100px;
background:rgba(138,200,15,0.8);
border:1px solid #79af03;
display:inline-block;
-webkit-transform:rotateX(30deg);
-moz-transform: rotateX(30deg);
transform: rotateX(30deg);
ﺟﻤﻴﻊ ﺍﻟﻮﺳﻮﻡ ﺍﻷﺑﻨﺎء " "childﺳﺘﺄﺧﺬ ﻧﻔﺲ ﺍﻟﺘﺄﺛﻴﺮ ،ﻭ ﺳﻴﺘﻢ ﺭﺅﻳﺘﻬﺎ ﻣﻦ ﻧﻘﻄﺔ ﻣﻮﺣﺪﺓ
ﻛﻤﺎ ﺗﺒﻴﻦ ﺍﻟﺼﻮﺭﺓ ﺃﺳﻔﻠﻪ :
ﺃﻣﺎ ﺇﺫﺍ ﻁﺒﻘﻨﺎ ﻋﻠﻰ ﻧﻔﺲ ﺍﻟﻮﺳﻮﻡ ﺍﻟﺪﺍﻟﺔ )( ، perspectiveﻓﻜﻞ ﻭﺳﻢ ﺳﻴﺘﻢ ﺍﻟﺘﺄﺛﻴﺮ ﻋﻠﻴﻪ
ﺑﺸﻜﻞ ﻣﻨﻔﺮﺩ ،ﻭ ﺳﺘﺘﻢ ﺭﺅﻳﺘﻪ ﻣﻦ ﺍﻟﻤﺴﺎﻓﺔ ﺍﻟﻤﺘﻌﻠﻘﺔ ﺑﻪ ،ﻛﻤﺎ ﺗﺒﻴﻦ ﺍﻟﺼﻮﺭﺓ ﺃﺳﻔﻠﻪ:
{ .child
/* ... */
;)-webkit-transform:perspective(500px) rotateX(30deg
;)-moz-transform: perspective(500px) rotateX(30deg
transform: ;)perspective(500px) rotateX(30deg
}
CSS3 perspective-origin
ﺑﺎﻟﻨﺴﺒﺔ ﻟﻠﺨﺎﺻﻴﺔ perspectiveﻳﻤﻜﻨﻨﺎ ﺗﻐﻴﻴﺮ ﻧﻘﻄﺔ ﺍﻟﻤﻨﻈﻮﺭ )ﻧﻘﻄﺔ ﺍﻟﺘﻼﺷﻲ( .
ﻣﺒﺪﺋﻴﺎ ﺗﻮﺟﺪ ﻫﺬﻩ ﺍﻟﻨﻘﻄﺔ ﻭﺳﻂ ﺍﻟﻌﻨﺼﺮ ﺍﻷﺏ ،ﻭﺗﺄﺧﺬ ﻗﻴﻤﺔ center:ﺃﻭ %50ﻛﻤﺎ
ﺭﺃﻳﻨﺎ ﺳﺎﺑﻘﺎ ﻓﻲ ﺍﻟﺨﺎﺻﻴﺔtransform-origin .
{ .parent
;-webkit-perspective:500px
;-moz-perspective: 500px
perspective: ;500px
CSS3 transform-style
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
}
CSS3 backface-visibility
ﺗُﺤﺪﺩ ﻫﺬﻩ ﺍﻟﺨﺎﺻﻴﺔ ﻣﺎ ﺇﺫﺍ ﻛﺎﻥ ﻳﺠﺐ ﺇﺧﻔﺎء ﺃﻭ ﺇﻅﻬﺎﺭ ﺍﻟﻮﺟﻪ ﺍﻟﺨﻠﻔﻲ ﻟﻠﻌﻨﺼﺮ ﺃﺛﻨﺎء
.ﺩﻭﺭﺍﻧﻪ
visible|hidden|initial|inherit : ﺗﺄﺧﺬ ﺍﻟﺨﺎﺻﻴﺔ ﺍﻟﻘﻴﻢ ﺍﻟﺘﺎﻟﻴﺔ
.box1 {
-moz-transform: rotateY(180deg);
-webkit-transform: rotateY(180deg);
transform: rotateY(180deg);
-moz-backface-visibility: hidden;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
CSS3 ﻭﺑﻬﺫﺍ ﻧﻛﻭﻥ ﻗﺩ ﺍﻧﺗﻬﻳﻧﺎ ﻣﻥ ﻋﺎﺷﺭ ﻣﻛﻭﻥ ﺍﻭ ﺍﺿﺎﻓﺔ ﺟﺩﻳﺩﺓ ﻓﻰ ﻟﻐﺔ ﺍﻟـــ
CSS3 transitions : 11ﺍﻟﺗﺎﺛﻳﺭﺍﺕ ﺍﻻﻧﺗﻘﺎﻟﻳﺔ
transitionﻫﻲ ﺇﺣﺪﻯ ﺍﻻﺿﺎﻓﺎﺕ ﺍﻟﺠﺪﻳﺪﺓ ﻓﻰ ﺍﻟﻠﻐﺔ ، CSS3ﺗﺘﻴﺢ ﻟﻨﺎ ﺍﻟﺘﺤﻜﻢ ﻓﻲ
ﺍﻟﻔﺘﺮﺓ ﺍﻹﻧﺘﻘﺎﻟﻴﺔ ﺃﺛﻨﺎء ﺗﻐﻴﻴﺮ ﺃﻧﻤﺎﻁ ﻋﻨﺼﺮ ﻣﺎ ﺩﻭﻥ ﺍﻟﻠﺠﻮء ﺇﻟﻰ ﺍﺳﺘﻌﻤﺎﻝ ﺍﻟﻔﻼﺵ ﺃﻭ
ﺟﺎﻓﺎﺳﻜﺮﻳﺒﺖ .ﻋﺎﺩﺓ ﻋﻨﺪﻣﺎ ﻧُﻐﻴﺮ ﻣﺜﻼ ﻟﻮﻥ ﻋﻨﺼﺮ ﺃﺛﻨﺎء ﻣﺮﻭﺭ ﻣﺆﺷﺮ ﺍﻟﻔﺄﺭﺓ ﻓﻮﻗﻪ
" ،"hoverﻓﺈﻧﻨﺎ ﻧﻨﺘﻘﻞ ﺑﺼﻔﺔ ﺣﺎﺩﺓ ﻭ ﻓﻮﺭﻳﺔ ﻣﻦ ﺍﻟﻨﻤﻂ ﺍﻷﺻﻠﻲ ﺇﻟﻰ ﺍﻟﻨﻤﻂ ﺍﻟﻨﻬﺎﺋﻲ .
ﺑﺎﺳﺘﻌﻤﺎﻝ transitionﻳﻤﻜﻨﻨﺎ ﺍﻟﺘﺤﻜﻢ ﻓﻲ ﻭﻗﺖ ﺑﺪﺍﻳﺔ ﺍﻟﻔﺘﺮﺓ ﺍﻹﻧﺘﻘﺎﻟﻴﺔ ﻭ ﺳﺮﻋﺘﻬﺎ ﻭ
ﻣﺪﺗﻬﺎ ،ﻋﺒﺮ ﻣﺠﻤﻮﻋﺔ ﻣﻦ ﺍﻟﺨﺎﺻﻴﺎﺕ ،ﺃﺑﺪﺃ ﺑﺴﺮﺩﻫﺎ .ﺛﻢ ﺳﻨﺘﻌﺮﻑ ﻋﻠﻴﻬﺎ ﻋﺒﺮ ﺃﻣﺜﻠﺔ.
ﺍﻭﻻ ﺍﻟﻤﺘﺼﻔﺤﺎﺕ ﺍﻟﺘﻰ ﺗﺘﺪﻋﻢ ﻫﺬﺓ ﺍﻟﺨﺎﺻﻴﺔ ﺍﻟﺠﺪﻳﺪﺓ ﻫﻰ ﻣﻮﺿﺤﺔ ﻓﻰ ﺍﻟﺸﻜﻞ ﺍﻟﺘﺎﻟﻰ:
<html>
<head>
<style>
div {
width: 100px;
height: 100px;
background: red;
-webkit-transition: width 3s; /* safari(3.1 => 6.1) , chrome(4.0 => < 26.0)*/
-moz-transition: width 3s; /* firefox(4.0 => < 16.0) */
-o-transition: width 3s; /* opera(10.5 => 12.0) */
transition: width 3s; /* * ﺍﻟﺨﺎﺻﻴﺔ ﺍﻷﺻﻠﻴﺔ/
div:hover {
width: 300px;
</style>
</head>
<body>
<p><b>Note:</b> This example does not work in Internet Explorer 9 and earlier
versions.</p>
<div></div>
<p>Hover over the div element above, to see the transition effect.</p>
</body>
ﺧﺎﺻﻴﺔ Transitionsﺗﻌﻨﻰ ﺍﻟﺘﺄﺛﻴﺮﺍﺕ ﺍﻟﺘﻲ ﺗﺤﺪﺙ ﺃﺛﻨﺎء ﺍﻟﻔﺘﺮﺓ ﺍﻹﻧﺘﻘﺎﻟﻴﺔ ﻣﻦ ﻧﻤﻂ
ﺇﻟﻰ ﺁﺧﺮ ﻟﻨﻔﺲ ﺍﻟﻌﻨﺼﺮ .ﻟﺘﻔﻌﻴﻞ ﻫﺬﻩ ﺍﻟﺘﺄﺛﻴﺮﺍﺕ ،ﻳﺠﺐ ﻋﻠﻰ ﺍﻷﻗﻞ ﺗﺤﺪﻳﺪ ﺷﻴﺌﻴﻦ
ﺃﺳﺎﺳﻴﻦ:
ﻟﻨﺄﺧﺬ ﺍﻟﻤﺜﺎﻝ ﺃﺳﻔﻠﻪ .ﺳﻨﻄﺒﻖ ﺍﻟﺘﺄﺛﻴﺮ ﻋﻠﻰ ﺍﻟﺨﺎﺻﻴﺔ " "widthﻭ ﺳﺘﺴﺘﻐﺮﻕ ﺍﻟﻤﺮﺣﻠﺔ
ﺍﻷﻧﺘﻘﺎﻟﻴﺔ 3ﺛﻮﺍﻧﻲ.
ﻟﻨﻘﻮﻡ ﺑﺘﺘﻄﺒﻴﻖ ﺍﻟﺘﺄﺛﻴﺮ ﻋﻠﻰ ﺃﻛﺜﺮ ﻣﻦ ﺧﺎﺻﻴﺔ
ﻣﻦ ﺃﺟﻞ ﺍﻟﺘﺤﻜﻢ ﺍﻟﺴﻠﻴﻢ ﻓﻲ ﺍﻟﺘﺄﺛﻴﺮﺍﺕ ﺍﻹﻧﺘﻘﺎﻟﻴﺔ ،ﻳﻤﻜﻨﻨﺎ ﺍﺳﺘﻌﻤﺎﻝ ﻣﺠﻤﻮﻋﺔ ﻣﻦ
ﺍﻟﺨﺎﺻﻴﺎﺕ ﺍﻟﻤﺨﺘﺼﺮﺓ:
ﺑﺪﻝ ﻛﺘﺎﺑﺔ ﺍﻟﺨﺎﺻﻴﺎﺕ ﺍﻟﺘﻲ ﺳﻴﺸﻤﻠﻬﺎ ﺍﻟﺘﺄﺛﻴﺮ ﻛﻘﻴﻢ ﻟﻠﺨﺎﺻﻴﺔ transition .ﻭ ﻷﺳﺒﺎﺏ
ﺗﻨﻈﻴﻤﻴﺔ ﻭ ﺗﺴﻬﻴﻞ ﺍﻹﺳﺘﻌﻤﺎﻝ ،ﻣﻦ ﺍﻷﻓﻀﻞ ﺍﻟﻘﻴﺎﻡ ﺑﺴﺮﺩ ﻫﺬﻩ ﺍﻟﺨﺎﺻﻴﺎﺕ ﻛﻘﻴﻢ
ﻟﻠﺨﺎﺻﻴﺔ transition-property .ﻣﺜﻼ ﺇﺫﺍ ﺃﺭﺩﻧﺎ ﺗﻄﺒﻴﻖ ﺍﻟﺘﺄﺛﻴﺮ ﻋﻠﻰ ﺍﻟﻄﻮﻝ ﻭ
ﺍﻟﻌﺮﺽ ﻭ ﺍﻟﻠﻮﻥ ،ﻧﺴﺘﻌﻤﻠﻬﺎ ﻛﺎﻟﺘﺎﻟﻲ:
transition-duration
{ .box
;transition-property: width, height
;transition-duration: 2s
}
ﺃﻭ ﺗﺤﺪﻳﺪ ﻣﺪﺓ ﺯﻣﻨﻴﺔ ﻣﺨﺘﻠﻔﺔ ﻟﻜﻞ ﺧﺎﺻﻴﺔ ﻋﻠﻰ ﺣﺪﺓ ،ﻓﻲ ﺍﻟﻤﺜﺎﻝ ﺃﺳﻔﻠﻪ ﺳﻴﺴﺘﻐﺮﻕ
ﺍﻟﺘﺄﺛﻴﺮ ﺛﺎﻧﻴﺘﻴﻦ ﻟﻠﻌﺮﺽ ﻭ ﺃﺭﺑﻊ ﺛﻮﺍﻧﻲ ﻟﻠﻄﻮﻝ
{ .box
;transition-property: width, height
;transition-duration: 2s, 4s
}
:ﻣﺜﺎﻻ ﻟﻠﺨﺎﺻﻴﺘﻴﻦ
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
.box {
width: 100px;
height: 100px;
background-color: red;
-webkit-transition-property: width, height, background-color;
transition-property: width, height, background-color;
-webkit-transition-duration: 2s, 3s, 4s;
transition-duration: 2s, 3s, 4s;
}
.box:hover {
width: 250px;
height: 250px;
background-color: green;
}
</style>
</head>
<body>
<h1>CSS3 transition duration</h1>
<h2><ﺿﻊ ﻣﺆﺷﺮ ﺍﻟﻔﺄﺭﺓ ﻋﻠﻰ ﺍﻟﻌﻨﺼﺮ ﻟﻴﺒﺪﺃ ﺍﻟﺘﺄﺛﻴﺮ/h2>
<div class="box"></div>
<p style="color:green;"><b> ﻳﻌﻮﺩ ﻟﻨﻤﻄﻪ، ﻋﻨﺪﻣﺎ ﻧُﺒﻌﺪ ﻣﺆﺷﺮ ﺍﻟﻔﺄﺭﺓ ﻋﻦ ﺍﻟﻌﻨﺼﺮ
<ﺍﻷﺻﻠﻲ/b><p>
</body>
</html>
transition-delay
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
.box {
width: 100px;
height: 100px;
background-color: red;
-webkit-transition-property: width;
-webkit-transition-duration: 3s;
-webkit-transition-delay: 2s;
transition-property: width;
transition-duration: 3s;
transition-delay: 2s;
}
.box:hover {
width: 300px;
}
</style>
</head>
<body>
<h1>CSS3 transition delay</h1>
<h2><ﻋﻨﺪ ﻭﺿﻊ ﻣﺆﺷﺮ ﺍﻟﻔﺄﺭﺓ ﻋﻠﻰ ﺍﻟﻌﻨﺼﺮ ﺳﺘﻨﺘﻈﺮ ﺛﺎﻧﻴﺘﻴﻦ ﻗﺒﻞ ﺃﻥ ﻳﺒﺪﺃ ﺍﻟﺘﺄﺛﻴﺮ/h2>
<div class="box"></div>
</body>
</html>
ﻋﻨﺪ ﻭﺿﻊ ﻣﺆﺷﺮ ﺍﻟﻔﺄﺭﺓ ﻋﻠﻰ ﺍﻟﻌﻨﺼﺮ ﺳﺘﻨﺘﻈﺮ ﺛﺎﻧﻴﺘﻴﻦ ﻗﺒﻞ ﺃﻥ ﻳﺒﺪﺃ ﺍﻟﺘﺄﺛﻴﺮ
transition-timing-function
{ .box
;-webkit-transition-timing-function: linear
;transition-timing-function: linear
}
.box1 {
-webkit-transition-timing-function: linear;
transition-timing-function: linear;
}
.box2 {
-webkit-transition-timing-function: ease;
transition-timing-function: ease;
}
.box3 {
-webkit-transition-timing-function: ease-in;
transition-timing-function: ease-in;
}
.box4 {
-webkit-transition-timing-function: ease-out;
transition-timing-function: ease-out;
}
.box5 {
-webkit-transition-timing-function: ease-in-out;
transition-timing-function: ease-in-out;
}
ﺑﺎﺳﺘﻌﻤﺎﻝ ﻣﻜﻌﺐ ﺑﻴﺰﻳﻲ، ﻧﻔﺲ ﺍﻟﻤﺜﺎﻝ
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
h4 { text-align:center;color:#fff;}
div {
width: 100px;
height: 50px;
background-color: red;
-webkit-transition-property: width;
transition-property: width;
-webkit-transition-duration: 2s;
transition-duration: 2s;
}
div:hover {width: 300px;}
.box1 {
-webkit-transition-timing-function: linear;
transition-timing-function: linear;
}
.box2 {
-webkit-transition-timing-function: ease;
transition-timing-function: ease;
}
.box3 {
-webkit-transition-timing-function: ease-in;
transition-timing-function: ease-in;
}
.box4 {
-webkit-transition-timing-function: ease-out;
transition-timing-function: ease-out;
}
.box5 {
-webkit-transition-timing-function: ease-in-out;
transition-timing-function: ease-in-out;
}
</style>
</head>
<body>
ﻳﻈﻬﺮ ﻓﻰ ﺍﻟﻤﺴﺘﻌﺮﺽ ﻛﻤﺎ ﻳﻠﻰ ﻣﻊ ﻣﻼﺣﻈﺔ ﺿﻊ ﻣﺆﺷﺮ ﺍﻟﻔﺄﺭﺓ ﻋﻠﻰ ﺍﻟﻌﻨﺼﺮ ﻟﻴﺒﺪﺃ
ﺍﻟﺘﺄﺛﻴﺮ
ﻭﻛﻤﺎ ﺗﻌﻮﺩﻧﺎ ﻗﺒﻞ ﺷﺮﺡ ﺍﻻﺿﺎﻓﺔ ﺍﻟﺠﺪﻳﺪﺓ ﻳﺘﻢ ﺗﻮﺿﻴﺢ ﺍﻟﻤﺴﺘﻌﺮﺿﺎﺕ ﺍﻟﺘﻰ ﺗﺘﺪﻋﻢ ﻫﺬﺓ
ﺍﻟﺨﺎﺻﻴﺔ ﺍﻟﺠﺪﻳﺪﺓ ﻭﺍﻟﻤﻮﺿﺢ ﻓﻰ ﺍﻟﺸﻜﻞ ﺍﻟﺘﺎﻟﻰ :
ﺍﻟﺧﺎﺻﻳﺔ Animation
ﻹﻧﺸﺎء ﺍﻟﻌﻨﺼﺮ ﺍﻟﺬﻱ ﺳﻴﺘﻢ ﺗﻨﺸﻴﻄﻪ ،ﻧﺴﺘﻌﻤﻞ ﺍﻟﺨﺎﺻﻴﺔ animationﻭ ﻧﺤﺪﺩ ﻟﻬﺎ
ﻗﻴﻤﺘﻴﻦ ﻋﻠﻰ ﺍﻷﻗﻞ :ﺇﺳﻢ ﺍﻟﻌﻨﺼﺮ ﺍﻟﺬﻱ ﺳﻴﺘﻢ ﺗﻨﺸﻴﻄﻪ ،ﻭ ﺍﻟﻮﻗﺖ ﺍﻟﺬﻱ ﺳﻴﺴﺘﻐﺮﻗﻪ
ﺍﻟﺘﻨﺸﻴﻂ ﻛﻤﺎ ﻳﻠﻰ :
{ div
;animation: mytest 5s
}
ﺍﻟﻘﻴﻤﺔ ﺍﻷﻭﻟﻰ " "mytestﻫﻲ ﺇﺳﻢ ﺍﻟﻌﻨﺼﺮ ﺍﻟﺬﻱ ﺳﻴﺘﻢ ﺗﻨﺸﻴﻄﻪ ،ﻫﻲ ﻗﻴﻤﺔ ﺍﻓﺘﺮﺍﺿﻴﺔ
ﻳﻤﻜﻨﻜﻢ ﺗﺴﻤﻴﺘﻬﺎ ﻛﻤﺎ ﺷﺌﺘﻢ .ﺃﻣﺎ ﺍﻟﻘﻴﻤﺔ ﺍﻟﺜﺎﻧﻴﺔ "s" 5ﺗُﺤ ّﺪﺩ ﺍﻟﻤﺪﺓ ﺍﻟﺰﻣﻨﻴﺔ ﺍﻟﺘﻲ
ﺳﻴﺴﺘﻐﺮﻗﻬﺎ ﺍﻟﺘﻨﺸﻴﻂ .
ﺑﻬﺬﺍ ﺃﺻﺒﺢ ﺍﻟﻌﻨﺼﺮ divﺟﺎﻫﺰﺍ ﻟﻠﺘﻨﺸﻴﻂ .ﻟﺘﻔﻌﻴﻞ ﺍﻟﻌﻤﻠﻴﺔ ﻳﺠﺐ ﺗﻤﺮﻳﺮ ﺇﺳﻢ ﺍﻟﻌﻨﺼﺮ
ﺍﻟﺬﻱ ﺃﻧﺸﺄﻧﺎﻩ " "mytestﻟﻠﺨﺎﺻﻴﺔ ﺍﻟﺜﺎﻧﻴﺔ@keyframes .
{ @keyframes mytest
/* ... */
}
ﺍﻟﺧﺎﺻﻳﺔ @keyframes :
ﺩﺍﺧﻞ ﺍﻟﺨﺎﺻﻴﺔ @keyframesﻧﻘﻮﻡ ﺑﺘﺤﺪﻳﺪ ﺷﻜﻞ ﺍﻟﻨﻤﻂ ﺍﻟﺬﻱ ﺳﻴﻜﻮﻥ ﻋﻠﻴﻪ ﺍﻟﻌﻨﺼﺮ
ﻓﻲ ﺯﻣﻦ ﻣﺎ ﺃﺛﻨﺎء ﺍﻟﺘﻨﺸﻴﻂ ،ﻳﻤﻜﻨﻨﺎ ﺗﺤﺪﻳﺪ ﻧﻤﻂ ﺍﻟﺒﺪﺍﻳﺔ ﻭ ﺍﻟﻨﻬﺎﻳﺔ ﻭ ﻛﺬﻟﻚ ﺍﻷﻧﻤﺎﻁ ﺍﻟﺒﻴﻨﻴﺔ
.
ﻟﺘﺤﺪﻳﺪ ﻧﻤﻂ ﺍﻟﺒﺪﺍﻳﺔ ﻭ ﺍﻟﻨﻬﺎﻳﺔ ﻳﻤﻜﻨﻨﺎ ﺍﺳﺘﻌﻤﺎﻝ ﻣﻔﺘﺎﺣﻲ " : "from , toﻭ ﻫﻲ ﺗﻌﻨﻲ
"ﻣﻦ ،ﺇﻟﻰ " :
ﺩﺍﺧﻞ " "fromﺳﻨﻘﻮﻡ ﺑﺘﺤﺪﻳﺪ ﺃﻧﻤﺎﻁ ﺍﻟﺒﺪﺍﻳﺔ.
ﺩﺍﺧﻞ " "toﻧﺤﺪﺩ ﺃﻧﻤﺎﻁ ﺍﻟﻨﻬﺎﻳﺔ.
{ @keyframes mytest
{ from
;background-color: blue
}
{ to
;background-color: red
}
}
ﻓﻲ ﺍﻟﻣﺛﺎﻝ ﺃﺳﻔﻠﻪ ،ﺳﻧﻘﻭﻡ ﺑﺗﻧﺷﻳﻁ ﺍﻟﻌﻧﺻﺭ ﺍﻟﻣﺳﻣﻰ " "mytestﻟﻣﺩﺓ 6
ﺛﻮﺍﻧﻲ .ﻭ ﺳﻨﻘﻮﻡ ﺑﺘﻐﻴﻴﺮ ﻟﻮﻧﻪ ﻣﻦ ﺍﻷﺯﺭﻕ "ﻟﻮﻥ ﺍﻟﺒﺪﺍﻳﺔ" ﺇﻟﻰ ﺍﻟﻠﻮﻥ ﺍﻷﺣﻤﺮ "ﻟﻮﻥ
ﺍﻟﻨﻬﺎﻳﺔ"
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
div {
width:150px;
height:150px;
background-color:blue;
-webkit-animation: mytest 6s;
animation: mytest 6s;
}
@-webkit-keyframes mytest {
from { background-color: blue; }
to { background-color: red; }
}
@keyframes mytest {
from { background-color: blue; }
to { background-color: red; }
}
</style>
</head>
<body>
<div></div>
</body>
</html>
ﻳﻣﻛﻧﻧﺎ ﺗﻁﺑﻳﻕ ﺍﻟﻌﺩﺩ ﺍﻟﺫﻱ ﻧﺭﻳﺩﻩ ﻣﻥ ﺍﻷﻧﻣﺎﻁ ﺩﺍﺧﻝ @keyframes .ﻟﻧﺭﻯ ﻣﺛﺎﻻ
ﺁﺧﺭ .
ﺳﻧﻘﻭﻡ ﺑﺗﺣﺭﻳﻙ ﻭﺳﻡ ﺍﻟﻌﻧﻭﺍﻥ h1ﻣﻥ ﺍﻟﻳﻣﻳﻥ ﺇﻟﻰ ﺍﻟﻳﺳﺎﺭ ﻭ ﻧﻘﻭﻡ ﺑﺗﻐﻳﻳﺭ ﻟﻭﻧﻪ ﻓﻲ
ﺍﻟﻭﻗﺕ ﻧﻔﺳﻪ .ﻛﻣﺎ ﻳﻠﻰ :
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
h1 {
-webkit-animation: mytest 5s;
animation: mytest 5s;
}
@-webkit-keyframes mytest {
from {
margin-left: 70%;
color: red;
}
to {
margin-left: 0%;
color: green;
}
}
@keyframes mytest {
from {
margin-left: 70%;
color: red;
}
to {
margin-left: 0%;
color: green;
}
}
</style>
</head>
<body>
<h1><ﻋﻧﻭﺍﻥ ﻣﺗﺣﺭﻙ/h1>
</body>
</html>
ﻳﻣﻛﻧﻧﺎ ﺃﻳﺿﺎ ﺍﺳﺗﻌﻣﺎﻝ ﻣﻔﺎﺗﻳﺢ ﺍﻟﻧﺳﺏ ﺍﻟﻣﺅﻳﺔ ﺑﺩﻝ " ، "from ... toﻭ ﻫﺫﺍ ﺳﻳﺳﺎﻋﺩﻧﺎ
ﻋﻠﻰ ﺗﺣﺩﻳﺩ ﺃﻧﻣﺎﻁ ﺑﻳﻧﻳﺔ ﺃﺧﺭﻯ ﻟﻠﻌﻧﺻﺭ ﺑﺎﻹﺿﺎﻓﺔ ﺇﻟﻰ ﻧﻣﻁ ﺍﻟﺑﺩﺍﻳﺔ ﻭ ﺍﻟﻧﻬﺎﻳﺔ .ﻛﻣﺎ ﻓﻰ
ﺍﻟﻣﺛﺎﻝ ﺍﻟﺗﺎﻟﻰ ::
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
div {
width:150px;
height:150px;
background-color:blue;
-webkit-animation: mytest 6s;
animation: mytest 6s;
}
@-webkit-keyframes mytest {
0% { background-color: blue;}
25% { background-color: green; }
50% { background-color: red; }
75% { background-color: yellow; }
100% { background-color: orange; }
}
@keyframes mytest {
0% { background-color: blue;}
25% { background-color: green; }
50% { background-color: red; }
75% { background-color: yellow; }
100% { background-color: orange; }
}
</style>
</head>
<body>
<div></div>
</body>
</html>
animationﺍﻟﺧﺎﺻﻳﺎﺕ ﺍﻟﻣﺧﺗﺻﺭﺓ
ﻟﺩﻳﻧﺎ ﻣﺟﻣﻭﻋﺔ ﻣﻥ ﺍﻟﺧﺎﺻﻳﺎﺕ ﺍﻟﻣﺧﺗﺻﺭﺓ ﺍﻟﺩﺍﻋﻣﺔ ﻭ ﺍﻟﺗﻲ ﺗﺳﻬﻝ ﻋﻠﻳﻧﺎ ﺍﻟﺗﺣﻛﻡ ﻓﻲ
ﺗﻧﺷﻳﻁ ﺍﻟﻌﻧﺎﺻﺭ .ﻟﻛﻝ ﻭﺍﺣﺩﺓ ﺩﻭﺭﻫﺎ ﺍﻟﻣﻧﻭﻁ ﺑﻬﺎ .ﺭﺃﻳﻧﺎ ﻣﻧﻬﺎ ﻓﻲ ﺍﻷﻣﺛﻠﺔ ﺍﻟﺳﺎﺑﻘﺔ
ﺧﺎﺻﻳﺗﻳﻥ ﻛﻧﺎ ﻗﺩ ﺍﺳﺗﻌﻣﻠﻧﺎﻫﻣﺎ ﻛﻘﻳﻡ ﻟﻠﺧﺎﺻﻳﺔ animationﻫﻣﺎ:
ﺗﻛﺭﺍﺭ ﺍﻟﺗﻧﺷﻳﻁ
: animation-play-stateﺗﻣﻛﻧﻧﺎ ﻣﻥ ﺗﻭﻗﻳﻑ ﺍﻟﺗﻧﺷﻳﻁ ﺃﻭ ﺗﻔﻌﻳﻠﻪ •
ﻣﺛﺎﻝ
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
div {
width: 50px;
height: 50px;
position: relative;
background: red;
-webkit-animation: moving 4s;
-moz-animation: moving 4s;
animation: moving 4s;
-webkit-animation-iteration-count: 3;
-moz-animation-iteration-count: 3;
animation-iteration-count: 3;
}
@-webkit-keyframes moving {
from {margin-left: 0%;}
to {margin-left: 90%;}
}
@keyframes moving {
from {margin-left: 0%;}
to {margin-left: 90%;}
}
</style>
</head>
<body>
<h1>animation-iteration-count : number</h1>
<div></div>
</body>
</html>
ﺩﻭﻥ ﺗﻭﻗﻑ، ﻳﺗﺣﺭﻙ ﺑﻭﺍﺳﻁﺗﻬﺎ ﺍﻟﻌﻧﺻﺭ ﺑﺻﻔﺔ ﻣﺳﺗﻣﺭﺓ: infinite ﺍﻟﻘﻳﻣﺔ
... ﻣﺛﺎﻝ
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
div {
width: 50px;
height: 50px;
position: relative;
background: red;
-webkit-animation: moving 4s;
-moz-animation: moving 4s;
animation: moving 4s;
-webkit-animation-iteration-count: infinite;
-moz-animation-iteration-count: infinite;
animation-iteration-count: infinite;
}
@-webkit-keyframes moving {
from {margin-left: 0%;}
to {margin-left: 90%;}
}
@keyframes moving {
from {margin-left: 0%;}
to {margin-left: 90%;}
}
</style>
</head>
<body>
<h1>animation-iteration-count : infinite</h1>
<div></div>
</body>
</html>
animation-direction ﺍﻟﺧﺎﺻﻳﺔ
ﺗﺣﺩﺩ ﻣﺎ ﺇﺫﺍ ﻛﺎﻥ ﺍﻟﺗﻧﺷﻳﻁ ﺳﻳﻠﻌﺏ ﻓﻲ ﺍﻹﺗﺟﺎﻩanimation-direction ﺍﻟﺧﺎﺻﻳﺔ
: ﻭ ﺗﺄﺧﺫ ﺍﻟﻘﻳﻡ ﺍﻟﺗﺎﻟﻳﺔ. ﺍﻟﻌﻛﺳﻲ ﺃﻭ ﻭﻓﻕ ﺩﻭﺭﺍﺕ ﻣﺗﻛﺭﺭﺓ
normal| reverse| alternate| alternate-reverse| initial|
inherit
.. ﻭﺳﻧﻘﻭﻡ ﺑﺷﺭﺡ ﻫﺫﺓ ﺍﻟﻘﻳﻡ
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
div {
width: 50px;
height: 50px;
background-color:red;
-webkit-animation: moving 5s;
animation: moving 5s;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
-webkit-animation-direction: normal;
animation-direction: normal;
}
@-webkit-keyframes moving {
from { margin-left: 90%;}
to { margin-left: 0%;}
}
@keyframes moving {
from { margin-left: 90%;}
to { margin-left:0%;}
}
</style>
</head>
<body>
<h1>animation-direction : normal</h1>
<div></div>
</body>
ﻳﻠﻌﺏ ﺍﻟﺗﻧﺷﻳﻁ ﺑﺷﻛﻝ ﻋﻛﺳﻲ: reverse ﺍﻟﻘﻳﻣﺔ
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
div {
width: 50px;
height: 50px;
background-color:red;
-webkit-animation: moving 5s;
animation: moving 5s;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
-webkit-animation-direction: reverse;
animation-direction: reverse;
}
@-webkit-keyframes moving {
from { margin-left: 90%;}
to { margin-left: 0%;}
}
@keyframes moving {
from { margin-left: 90%;}
to { margin-left: 0%;}
}
</style>
</head>
<body>
<h1>animation-direction : reverse</h1>
<div></div>
</body>
</html>
ﻳﺗﻡ ﺗﻐﻳﻳﺭ ﺍﺗﺟﺎﻩ ﺍﻟﺗﻧﺷﻳﻁ ﺑﻌﺩ ﺍﻧﺗﻬﺎء ﻛﻝ ﺩﻭﺭﺓ: alternate ﺍﻟﻘﻳﻣﺔ
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
div {
width: 50px;
height: 50px;
background-color:red;
-webkit-animation: moving 5s;
animation: moving 5s;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
-webkit-animation-direction: alternate;
animation-direction: alternate;
}
@-webkit-keyframes moving {
from { margin-left:90%;}
to { margin-left:0%;}
}
@keyframes moving {
from { margin-left:90%;}
to { margin-left:0%;}
}
</style>
</head>
<body>
<h1>animation-direction : alternate</h1>
<div></div>
</body>
</html>
: alternate-reverse ﺍﻟﻘﻳﻣﺔ
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
div {
width:50px;
height:50px;
background-color:red;
-webkit-animation: moving 5s;
animation: moving 5s;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
-webkit-animation-direction: alternate-reverse;
animation-direction: alternate-reverse;
}
@-webkit-keyframes moving {
from { margin-left:90%;}
to { margin-left:0%;}
}
@keyframes moving {
from { margin-left:90%;}
to { margin-left:0%;}
}
</style>
</head>
<body>
<h1>animation-direction : alternate-reverse</h1>
<div></div>
</body>
</html>
ﺍﻟﺧﺎﺻﻳﺔ animation-timing-function :
ﺍﻟﻘﻴﻤﺔ : linearﻳﺤﺎﻓﻆ ﺍﻟﺘﻨﺸﻴﻂ ﻋﻠﻰ ﻧﻔﺲ ﺍﻟﺴﺮﻋﺔ ﻣﻦ ﺍﻟﺒﺪﺍﻳﺔ ﺇﻟﻰ ﻧﻬﺎﻳﺔ ﺍﻟﺪﻭﺭﺓ
ﻫﺬﻩ ﺍﻟﻘﻴﻤﺔ ﺗﻌﺎﺩﻝ ﻣﻜﻌﺐ ﺑﻴﺰﻳﻲ)cubic-bezier(0,0,1,1
ﺍﻟﻘﻴﻤﺔ : easeﺍﻟﻘﻴﻤﺔ ﺍﻹﻓﺘﺮﺍﺿﻴﺔ :ﻳﺒﺪﺃ ﺍﻟﺘﻨﺸﻴﻂ ﺑﺒﻂء ﺛﻢ ﻳﺰﺩﺍﺩ ﺳﺮﻋﺔ ﺛﻢ ﻳﻨﺘﻬﻲ ﺑﺒﻂء
ﻫﺬﻩ ﺍﻟﻘﻴﻤﺔ ﺗﻌﺎﺩﻝ ﻣﻜﻌﺐ ﺑﻴﺰﻳﻲ)cubic-bezier(0.25,0.1,0.25,1
.box1 {
-webkit-animation-timing-function: cubic-bezier(0,0,0.25,1);
animation-timing-function: cubic-bezier(0,0,0.25,1);
}
.box2 {
-webkit-animation-timing-function: cubic-bezier(0.25,0.1,0.25,1);
animation-timing-function: cubic-bezier(0.25,0.1,0.25,1);
}
.box3 {
-webkit-animation-timing-function: cubic-bezier(0.42,0,1,1);
animation-timing-function: cubic-bezier(0.42,0,1,1);
}
.box4 {
-webkit-animation-timing-function: cubic-bezier(0,0,0.58,1);
animation-timing-function: cubic-bezier(0,0,0.58,1);
}
.box5 {
-webkit-animation-timing-function: cubic-bezier(0.42,0,0.58,1);
animation-timing-function: cubic-bezier(0.42,0,0.58,1);
}
@-webkit-keyframes moving {
from {margin-left: 0%;}
to {margin-left: 80%;}
}
@keyframes moving {
from {margin-left: 0%;}
to {margin-left: 80%;}
}
</style>
</head>
<body>
<h1>animation-timing-function </h1>
<div class="box1"><h4>linear</h4></div>
<div class="box2"><h4>ease</h4></div>
<div class="box3"><h4>ease-in</h4></div>
<div class="box4"><h4>ease-out</h4></div>
<div class="box5"><h4>ease-in-out</h4></div>
</body>
</html>
ﺍﻟﺨﺎﺻﻴﺔ animation-play-state
ﻣ ّﻛﻧﻧﺎ ﺍﻟﺧﺎﺻﻳﺔ animation-play-stateﻣﻥ ﺗﻭﻗﻳﻑ ﺍﻟﺗﻧﺷﻳﻁ ﺃﻭ ﺗﻔﻌﻳﻠﻪ .ﻳﻣﻛﻧﻧﺎ
ﺇﻋﻁﺎءﻫﺎ ﻗﻳﻣﺗﻳﻥ :
: runningﺍﻟﻘﻳﻣﺔ ﺍﻹﻓﺗﺭﺍﺿﻳﺔ ،ﺗﻘﻭﻡ ﺑﺗﺷﻐﻳﻝ ﺍﻟﺗﻧﺷﻳﻁ
: pausedﺗﻘﻭﻡ ﺑﺗﻭﻗﻳﻑ ﺍﻟﺗﻧﺷﻳﻁ
{ .box
;-webkit-animation-play-state:paused
;animation-play-state:paused
}
{ .box
;-webkit-animation-delay: 3s
;animation-delay: 3s
}
@-webkit-keyframes moving {
0% {background:black; left:0; top:0;}
25% {background:red; left:80%; top:0;}
50% {background:green; left:80%; top:250px;}
75% {background:orange; left:0; top:250px;}
100% {background:blue; left:0; top:0;}
}
@keyframes moving {
0% {background:black; left:0; top:0;}
25% {background:red; left:80%; top:0;}
50% {background:green; left:80%; :top:250px;}
75% {background:orange; left:0; top:250px;}
100% {background:blue; left:0; top:0;}
}
</style>
</head>
<body>
<div></div>
</body>
</html>
... ﻣﺛﺎﻝ ﺍﺧﺭ
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
.circle {
width: 100px;
height: 100px;
position:relative;
margin-right: 20px;
border-radius: 50%;
background: -webkit-linear-gradient(orange, yellow);
background: -moz-linear-gradient(orange, yellow);
background: -o-linear-gradient(orange, yellow);
background: linear-gradient(orange, yellow);
@-webkit-keyframes ball {
from { transform: translateX(0) rotate(0);}
to { transform: translateX(450px) rotate(3turn);}
}
@keyframes ball {
from { transform: translateX(0) rotate(0);}
to { transform: translateX(450px) rotate(3turn);}
}
</style>
</head>
<body>
<div class="circle"></div>
</body>
</html>
... ﻣﺛﺎﻝ
<!DOCTYPE html>
<html>
<head>
<style>
img {
border-radius: 8px;
</style>
</head>
<body>
<h2>Rounded Images</h2>
</body>
</html>
ﻣﺛﺎﻝ ﺍﺧﺭ ...
<!DOCTYPE html>
<html>
<head>
<style>
img {
border-radius: 50%;
</style>
</head>
<body>
<h2>Rounded Images</h2>
</body>
</html>
Thumbnail Images : ﺛﺎﻧﻳﺎ
- ﻳﺗﻡ ﺫﻟﻙ ﺑﺎﺳﺗﺧﺩﺍﻡ ﺧﺻﺎﺋﺹ ﺍﻻﻁﺎﺭThumbnail ﻟﺟﻌﻝ ﺍﻟﺻﻭﺭ ﺗﺎﺧﺫ ﺷﻛﻝ
ﺍﻟﺫﻯ ﺳﺑﻕ ﻭﺗﻡ ﺷﺭﺣﻬﺎ- border property
... ﻣﺛﺎﻝ
<!DOCTYPE html>
<html>
<head>
<style>
img {
border-radius: 4px;
padding: 5px;
width: 150px;
</style>
</head>
<body>
<h2>Thumbnail Images</h2>
</body>
</html>
ﻣﺛﺎﻝ ﺍﺧﺭ ﻟﻌﻣﻝ Thumbnailﻟﻠﺻﻭﺭ ﺑﺎﻻﺿﺎﻓﺔ ﺍﻟﻰ ﺭﻭﺍﺑﻁ
<!DOCTYPE html>
<html>
<head>
<style>
img {
border-radius: 4px;
padding: 5px;
width: 150px;
img:hover {
</style>
</head>
<body>
<p>Use the border property to create thumbnail images. Wrap an anchor around the image to use
it as a link.</p>
</a>
</body>
</html>
CSS The object-fit Property :14ﺗﻧﺳﻳﻕ ﺍﻟﻌﻧﺻﺭ ﺑﺎﺳﺗﺧﺩﺍﻡ ﺧﺎﺻﻳﺔ
ﻓﻣﺛﻼ ﻟﻭ ﻟﺩﻯ ﻋﻧﺻﺭ ﺍﻟﺻﻭﺭﺓ ﺍﺑﻌﺎﺩﻫﺎ px 400 px 200ﻫﺫﺓ ﺍﻟﺻﻭﺭﺓ ﻣﻣﻛﻥ ﺍﻥ
ﺗﺣﺗﻝ ﻧﻔﺱ ﺍﻻﺑﻌﺎﺩ ﺍﻭ ﺍﻗﻭﻡ ﺑﺗﺣﺩﻳﺩ ﻣﺳﺎﺣﺔ ﺟﺩﻳﺩﺓ ﺗﺷﻐﻠﻬﺎ ﻭﺑﺎﻟﺗﺎﻟﻰ ﻳﺗﻐﻳﺭ ﻣﺳﺎﺣﺔ
ﺍﻟﺻﻭﺭﺓ ﺍﻟﻅﺎﻫﺭﺓ
ﺳﻭﻑ ﺍﻗﻭﻡ ﺑﺎﺩﺭﺍﺝ ﺻﻭﺭﺓ ﺑﺩﻭﻥ ﺍﺳﺗﺧﺩﺍﻡ ﺧﺎﺻﻳﺔ object-fitﻛﻣﺎ ﻳﻠﻰ :
<!DOCTYPE html>
<html>
<head>
<style>
img {
width:200px;
height:400px;
</style>
</head>
<body>
<h2>Image</h2>
</body>
</html>
<html>
<head>
<style>
img {
width:200px;
height:400px;
object-fit:cover;
</style>
</head>
<body>
</body>
</html>
ﻓﺗﻅﻬﺭ ﺍﻟﺻﻣﻭﺭﺓ ﺑﻣﻠﻰء ﻫﺫﺓ ﺍﻟﻣﺳﺎﺣﺔ ﻭﺳﻭﻑ ﻳﺗﻡ ﻗﻁﻊ ﺟﺯء ﻣﻥ ﺍﻟﺻﻭﺭﺓ ﻓﺗﻅﻬﺭ ﻓﻰ
ﺍﻟﻣﺳﺗﻌﺭﺽ ﻛﻣﺎ ﻳﻠﻰ :
:ﻣﺛﺎﻝ ﺍﺧﺭ ﻣﻊ ﻋﺩﻡ ﺍﺳﺗﺧﺩﺍﻡ ﻧﻔﺱ ﺍﻟﺧﺎﺻﻳﺔ
<!DOCTYPE html>
<html>
<body>
<p>Here we use do not use "object-fit", so when we resize the browser window, the aspect ratio of
the images will be destroyed:</p>
<div style="width:100%;height:400px;">
</div>
</body>
</html>
<html>
<body>
<h2>Using object-fit</h2>
<p>Here we use "object-fit: cover;", so when we resize the browser window, the aspect ratio of the
images is preserved:</p>
<div style="width:100%;height:400px;">
</div>
</body>
</html>
<html>
<head>
<style>
</style>
</head>
<body>
<h2>No object-fit:</h2>
<h2>object-fit: contain:</h2>
<h2>object-fit: cover:</h2>
<h2>object-fit: scale-down:</h2>
<h2>object-fit: none:</h2>
</body>
</html>
CSS Buttons ﺗﻧﺳﻳﻕ ﺍﻻﺯﺭﺍﺭ:14
: ﻟﺗﻧﺳﻳﻕ ﺍﻻﺯﺍﺭﺍ ﺑﺎﺳﺗﺧﺩﺍﻡ ﺍﻟﻠﻐﺔ ﻳﻛﺗﺏ ﺍﻟﻛﻭﺩ ﺍﻟﺗﺎﻟﻰ ﺍﻟﻣﻭﺿﺢ ﻓﻰ ﺍﻟﻣﺛﺎﻝ ﺍﻟﺗﺎﻟﻰ
<!DOCTYPE html>
<html>
<head>
<style>
.button {
background-color: #4CAF50;
border: none;
color: white;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
cursor: pointer;
</style>
</head>
<body>
<h2>CSS Buttons</h2>
<button>Default Button</button>
<button class="button">Button</button>
<!DOCTYPE html>
<html>
<head>
<style>
.button {
border: none;
color: white;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
cursor: pointer;
</style>
</head>
<body>
ﻭﻳﻅﻬﺭ ﻓﻰ ﺍﻟﻣﺳﺗﻌﺭﺽ ﻛﻣﺎ ﻳﻠﻰ
: ﻛﻣﺎ ﻳﻠﻰButton Sizes • ﻟﻠﺗﻌﺩﻳﻝ ﻭﺗﻐﻳﺭ ﺣﺟﻡ ﺍﻻﺯﺭﺍﺭ ﻳﺳﺗﺧﺩﻡ ﺍﻟﺧﺎﺻﻳﺔ
<!DOCTYPE html>
<html>
<head>
<style>
.button {
border: none;
color: white;
text-align: center;
text-decoration: none;
display: inline-block;
cursor: pointer;
</style>
</head>
<body>
<h2>Button Sizes</h2>
<!DOCTYPE html>
<html>
<head>
<style>
.button {
border: none;
color: white;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
cursor: pointer;
</style>
</head>
<body>
ﻳﺗﻡ ﺫﻟﻙ ﺑﺎﺳﺗﺧﺩﺍﻡRounded Buttons • ﻟﻌﻣﻝ ﺍﺯﺭﺍﺭ ﺫﺍﺕ ﺣﻭﺍﻑ ﺩﺍﺋﺭﻳﺔ
ﻛﻣﺎ ﻳﻠﻰborder-radius ﺧﺎﺻﻳﺔ
<!DOCTYPE html>
<html>
<head>
<style>
.button {
border: none;
color: white;
padding: 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
cursor: pointer;
</style>
</head>
<body>
ﻳﺗﻡ ﺫﻟﻙ ﺑﺎﺳﺗﺧﺩﺍﻡColored Button Borders • ﻟﻌﻣﻝ ﺍﻁﺎﺭ ﻟﻼﺯﺭﺍﺭ
ﻛﻤﺎ ﻳﻠﻰborder ﺧﺎﺻﻳﺔ
<!DOCTYPE html>
<html>
<head>
<style>
.button {
border: none;
color: white;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
cursor: pointer;
.button1 {
background-color: white;
color: black;
.button2 {
background-color: white;
color: black;
<!DOCTYPE html>
<html>
<head>
<style>
.button {
border: none;
color: white;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
transition-duration: 0.4s;
cursor: pointer;
.button1 {
background-color: white;
color: black;
.button1:hover {
background-color: #4CAF50;
ﻟﻌﻣﻝ ﻅﻝ ﻋﻠﻰ ﺍﻻﺯﺭﺍﺭ Shadow Buttonsﻳﺗﻡ ﺫﻟﻙ ﺑﺎﺳﺗﺧﺩﺍﻡ ﺧﺎﺻﻳﺔ •
box-shadowﻛﻤﺎ ﻳﻠﻰ
<!DOCTYPE html>
<html>
<head>
<style>
.button {
border: none;
color: white;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
cursor: pointer;
transition-duration: 0.4s;
.button1 {
.button2:hover {
</style>
</head>
<body>
<h2>Shadow Buttons</h2>
<!DOCTYPE html>
<html>
<head>
<style>
.button {
ﻛﻤﺎ ﻳﻠﻰwidth ﻳﺗﻡ ﺫﻟﻙ ﺑﺎﺳﺗﺧﺩﺍﻡ ﺧﺎﺻﻳﺔButton Width ﻟﻠﺗﺣﻛﻡ ﻓﻰ ﺣﺟﻡ ﺍﻻﺯﺭﺍﺭ
:
<!DOCTYPE html>
<html>
<head>
<style>
.button {
border: none;
color: white;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
cursor: pointer;
</style>
</head>
<body>
<h2>Button Width</h2>
<p><strong>Tip:</strong> Use pixels if you want to set a fixed width and use percent for responsive buttons (e.g. 50%
of its parent element). Resize the browser window to see the effect.</p>
ﻛﻣﺎfloat: • ﻟﺗﺣﻛﻡ ﻓﻰ ﺍﺗﺟﺎﺓ ﺍﻻﻭﺭﺍﺭ ﻭﺗﻌﻭﻳﻣﻬﺎ ﻳﺗﻡ ﺫﻟﻙ ﺑﺎﺳﺗﺧﺩﺍﻡ ﺧﺎﺻﻳﺔ
: ﻳﻠﻰ
<!DOCTYPE html>
<html>
<head>
<style>
.btn-group .button {
border: none;
color: white;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
cursor: pointer;
float: left;
.btn-group .button:hover {
background-color: #3e8e41;
</style>
</head>
<body>
<h2>Button Groups</h2>
<!DOCTYPE html>
<html>
<head>
<style>
.btn-group .button {
color: white;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
cursor: pointer;
float: left;
.btn-group .button:not(:last-child) {
.btn-group .button:hover {
background-color: #3e8e41;
</style>
</head>
<body>
ﻳﺘﻢ ﺫﻟﻚ ﺑﺎﺳﺘﺨﺪﺍﻡ ﺧﺎﺻﻴﺔButton on Image ﻟﻌﻣﻝ ﺯﺭﺍﺭ ﻋﻠﻰ ﺍﻟﺻﻭﺭﺓ •
<!DOCTYPE html>
<html>
<head>
<style>
.container {
position: relative;
width: 100%;
max-width: 400px;
.container img {
width: 100%;
height: auto;
.container .btn {
position: absolute;
top: 50%;
left: 50%;
background-color: #f1f1f1;
color: black;
font-size: 16px;
border: none;
Animated Buttons • ﻟﻌﻣﻝ ﺯﺭﺍﺭ ﻣﺗﺣﺭﻙ
<!DOCTYPE html>
<html>
<head>
<style>
.button {
display: inline-block;
border-radius: 4px;
background-color: #f4511e;
border: none;
color: #FFFFFF;
text-align: center;
font-size: 28px;
padding: 20px;
width: 200px;
cursor: pointer;
margin: 5px;
.button span {
cursor: pointer;
display: inline-block;
position: relative;
transition: 0.5s;
.button span:after {
content: '\00bb';
: ﻳﺗﻡ ﺫﻟﻙ ﻛﻣﺎ ﻳﻠﻰclick ﻟﻌﻣﻝ ﺯﺭﺍﺭ ﺑﺗﺎﺛﻳﺭ ﺍﻝ
<!DOCTYPE html>
<html>
<head>
<style>
.button {
display: inline-block;
font-size: 24px;
cursor: pointer;
text-align: center;
text-decoration: none;
outline: none;
color: #fff;
background-color: #4CAF50;
border: none;
border-radius: 15px;
.button:active {
background-color: #3e8e41;
transform: translateY(4px);
}
: ﻛﻣﺎ ﻳﻠﻰFade in ﻟﻌﻣﻝ ﺯﺭﺍﺭ ﺫﺍﺕ ﺗﺎﺛﻳﺭ ﺍﻝ
<!DOCTYPE html>
<html>
<head>
<style>
.button {
background-color: #f4511e;
border: none;
color: white;
text-align: center;
font-size: 16px;
opacity: 0.6;
transition: 0.3s;
display: inline-block;
text-decoration: none;
cursor: pointer;
.button:hover {opacity: 1}
</style>
</head>
<body>
</body>
Pagination : 15ﻋﻣﻝ ﺗﺭﻗﻳﻡ ﻟﻠﺻﻔﺣﺎﺕ
<html>
<head>
<style>
.pagination {
display: inline-block;
.pagination a {
color: black;
float: left;
text-decoration: none;
</style>
</head>
<body>
<h2>Simple Pagination</h2>
<div class="pagination">
<a href="#">«</a>
<a href="#">1</a>
<a href="#">2</a>
<a href="#">3</a>
<a href="#">4</a>
<a href="#">5</a>
<a href="#">6</a>
<a href="#">»</a>
</div>
</body>
</html>
Active and ﻟﻌﻤﻞ ﺗﺮﻗﻴﻢ ﺫﺍﺕ ﺗﺎﺛﻴﺮ ﻭﺫﻟﻚ ﺑﺎﻟﻤﺮﻭﺭ ﺑﺎﻟﻤﺎﻭﺱ ﻋﻠﻴﺔ •
Hoverable Pagination
<!DOCTYPE html>
<html>
<head>
<style>
.pagination {
display: inline-block;
.pagination a {
color: black;
float: left;
text-decoration: none;
.pagination a.active {
background-color: #4CAF50;
color: white;
</style>
</head>
<body>
<div class="pagination">
<a href="#">«</a>
<a href="#">1</a>
<a href="#">3</a>
<a href="#">4</a>
<a href="#">5</a>
<a href="#">6</a>
<a href="#">»</a>
</div>
• ﻟﻌﻤﻞ ﺗﺮﻗﻴﻢ ﺫﺍﺕ ﺗﺎﺛﻴﺮ ﻭﺑﺤﻮﺍﻑ ﺩﺍﺋﺮﻳﺔ ﻭﺫﻟﻚ ﺑﺎﻟﻤﺮﻭﺭ ﺑﺎﻟﻤﺎﻭﺱ ﻋﻠﻴﺔ
Rounded Active and Hoverable Buttons
<!DOCTYPE html>
<html>
<head>
<style>
.pagination {
display: inline-block;
.pagination a {
color: black;
float: left;
text-decoration: none;
.pagination a.active {
background-color: #4CAF50;
color: white;
border-radius: 5px;
.pagination a:hover:not(.active) {
background-color: #ddd;
border-radius: 5px;
</style>
</head>
<body>
<div class="pagination">
<a href="#">«</a>
<a href="#">1</a>
Bordered Pagination • ﻟﻌﻤﻞ ﺗﺮﻗﻴﻢ ﺫﺍﺕ ﺍﻁﺎﺭ
<!DOCTYPE html>
<html>
<head>
<style>
.pagination {
display: inline-block;
.pagination a {
color: black;
float: left;
text-decoration: none;
.pagination a.active {
background-color: #4CAF50;
color: white;
</style>
</head>
<body>
<div class="pagination">
<a href="#">«</a>
<a href="#">1</a>
<a href="#">3</a>
<a href="#">4</a>
<a href="#">5</a>
<a href="#">6</a>
<a href="#">»</a>
Space Between Links • ﻟﻌﻤﻞ ﻣﺴﺎﻓﺔ ﺑﻴﻦ ﺍﻟﺘﺮﻗﻴﻢ
<!DOCTYPE html>
<html>
<head>
<style>
.pagination {
display: inline-block;
.pagination a {
color: black;
float: left;
text-decoration: none;
margin: 0 4px;
.pagination a.active {
background-color: #4CAF50;
color: white;
</style>
</head>
<body>
<div class="pagination">
<a href="#">«</a>
<a href="#">1</a>
<a href="#">3</a>
Pagination Size • ﻟﻠﺘﻌﺪﻳﻞ ﻓﻰ ﺣﺠﻢ ﺍﻟﺘﺮﻗﻴﻢ
<!DOCTYPE html>
<html>
<head>
<style>
.pagination {
display: inline-block;
.pagination a {
color: black;
float: left;
text-decoration: none;
font-size: 22px;
.pagination a.active {
background-color: #4CAF50;
color: white;
</style>
</head>
<body>
<h2>Pagination Size</h2>
<div class="pagination">
<a href="#">«</a>
<a href="#">1</a>
-16ﻟﺘﻘﺴﻢ ﻭﺗﺨﻄﻴﻂ ﺍﻟﺼﻔﺤﺔ ﺍﻟﻰ ﻋﺪﺩ ﻣﻦ ﺍﻻﻋﻤﺪﺓ CSS Multi-column
Layout
ﻭﻫﺫﺍ ﺍﻟﺧﺎﺻﻳﺔ ﻳﺩﻋﻣﻬﺎ ﻛﻝ ﻣﻥ column ﻳﺗﻣﻡ ﺫﻟﻙ ﺑﺎﺳﺗﺧﺩﺍﻡ ﺍﻟﺧﺎﺻﻳﺔ ﺍﻟﺟﺩﻳﺩﺓ
ﺍﻟﻣﺳﺗﻌﺭﺿﺎﺕ ﺍﻟﺗﺎﻟﻰ :
• ﺍﻧﺸﺎء ﻋﺪﺩ ﻣﻦ ﺍﻻﻋﻤﺪﺓ CSS Create Multiple Columns
column-countﻛﻣﺎ ﻫﻭ ﻣﻭﺿﺢ ﺑﺎﻟﻣﺛﺎﻝ ﺍﻟﺗﺎﻟﻰ ﻳﺗﻡ ﺫﻟﻙ ﺑﺎﺳﺗﺧﺩﺍﻡ ﺧﺎﺻﻳﺔ ﺍﻝ
<!DOCTYPE html>
<html>
<head>
<style>
.newspaper {
-moz-column-count: 3; /* Firefox */
column-count: 3;
</style>
</head>
<body>
<p><b>Note:</b> Internet Explorer 9, and earlier versions, does not support the column-count property.</p>
<div class="newspaper">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum
iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio
dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option
congue nihil imperdiet doming id quod mazim placerat facer possim assum.
</div>
</body>
</html>
• ﻟﻌﻤﻞ ﻣﺴﺎﻓﺔ ﺑﻴﻦ ﺍﻻﻋﻤﺪﺓ ﻭﺗﺤﺪﻳﺪ ﻗﻴﻤﺘﻬﺎ CSS Specify the Gap
Between Columns
column-gapﻛﻤﺎ ﻓﻰ ﺍﻟﻤﺜﺎﻝ ﺍﻟﺘﺎﻟﻰ : ﻴﺘﻢ ﺬﻟﻚ ﺒﺎﺴﺘﺨﺪﺍﻢ ﺨﺎﺼﻴﺔ
<!DOCTYPE html>
<html>
<head>
<style>
.newspaper {
-moz-column-count: 3; /* Firefox */
column-count: 3;
column-gap: 40px;
</style>
</head>
<body>
<p><b>Note:</b> Internet Explorer 9, and earlier versions, does not support the column-gap property.</p>
<div class="newspaper">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum
iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio
dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option
congue nihil imperdiet doming id quod mazim placerat facer possim assum.
</div>
</body>
• ﻟﻌﻤﻞ ﻣﺴﻄﺮﺓ ﺍﻭ ﻓﻮﺍﺻﻞ ﺑﻴﻦ ﺍﻻﻋﻤﺪﺓ CSS Column Rules
column-rule-styleﻛﻣﺎ ﻳﻠﻰ : ﻳﺘﻢ ﺫﻟﻚ ﺑﺎﺳﺘﺨﺪﺍﻡ ﺧﺎﺻﻴﺔ ﺍﻝ
<!DOCTYPE html>
<html>
<head>
<style>
.newspaper {
-moz-column-count: 3; /* Firefox */
column-count: 3;
column-gap: 40px;
column-rule-style: solid;
</style>
</head>
<body>
<p><b>Note:</b> Internet Explorer 9, and earlier versions, does not support the column-rule-style property.</p>
<div class="newspaper">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum
iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio
dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option
congue nihil imperdiet doming id quod mazim placerat facer possim assum.
column-rule-width ﻟﺗﺣﺩﻳﺩ ﺳﻣﻙ ﺍﻟﻣﺳﻁﺭﺓ ﺍﻭ ﺍﻟﻔﺎﺻﻝ •
<!DOCTYPE html>
<html>
<head>
<style>
.newspaper {
-moz-column-count: 3; /* Firefox */
column-count: 3;
column-gap: 40px;
column-rule-style: solid;
column-rule-width: 1px;
</style>
</head>
<body>
<p><b>Note:</b> Internet Explorer 9, and earlier versions, does not support the column-rule-width property.</p>
<div class="newspaper">
ﺍﻟﻔﺎﺻﻝ column-rule-color ﻟﺗﺣﺩﻳﺩ ﻟﻭﻥ ﺍﻟﻣﺳﻁﺭﺓ ﺍﻭ •
<!DOCTYPE html>
<html>
<head>
<style>
.newspaper {
-moz-column-count: 3; /* Firefox */
column-count: 3;
column-gap: 40px;
column-rule-style: solid;
column-rule-width: 1px;
column-rule-color: lightblue;
</style>
</head>
<body>
• ﻟﺘﺤﺪﻳﺪ ﺳﻤﻚ ﺍﻟﻌﻤﻮﺩ Column Width
<!DOCTYPE html>
<html>
<head>
<style>
.newspaper {
-moz-column-count: 3; /* Firefox */
column-count: 3;
column-width: 100px;
</style>
</head>
<body>
<p><b>Note:</b> Internet Explorer 9, and earlier versions, does not support the column-width property.</p>
<div class="newspaper">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum
iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio
dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option
congue nihil imperdiet doming id quod mazim placerat facer possim assum.
</div>
</body>
ﺍﻟﺘﺤﻜﻢ ﻓﻰ ﻭﺍﺟﻬﺔ ﺍﻟﻤﺴﺘﺨﺪﻡ CSS User Interface
ﻫﺫﺓ ﺍﻟﺧﺎﺻﻳﺔ ﻳﺩﻋﻣﻬﺎ ﺍﻟﻣﺳﺗﻌﺭﺿﺎﺕ ﺍﻟﺗﺎﻟﻳﺔ :
<html>
<head>
<style>
div {
padding: 20px;
width: 300px;
resize: horizontal;
overflow: auto;
</style>
</head>
<body>
<div>
<p>Let the user resize only the width of this div element.</p>
<p>To resize: Click and drag the bottom right corner of this div element.</p>
</div>
</body>
</html>
ﻣﺛﺎﻝ ﺍﺧﺭ
<!DOCTYPE html>
<html>
<head>
<style>
div {
padding: 20px;
width: 300px;
resize: vertical;
overflow: auto;
</style>
</head>
<body>
<div>
<p>Let the user resize only the height of this div element.</p>
<p>To resize: Click and drag the bottom right corner of this div element.</p>
</div>
</body>
</html>
ﻣﺛﺎﻝ ﺍﺧﺭ
<!DOCTYPE html>
<html>
<head>
<style>
div {
padding: 20px;
width: 300px;
resize: both;
overflow: auto;
</style>
</head>
<body>
<div>
<p>Let the user resize both the height and the width of this div element.</p>
<p>To resize: Click and drag the bottom right corner of this div element.</p>
</div>
</body>
</html>
<!DOCTYPE html> CSS Outline Offset • ﻟﻌﻤﻞ ﺍﻁﺎﺭ
<html>
<head>
<style>
div.ex1 {
margin: 20px;
outline-offset: 15px;
div.ex2 {
margin: 10px;
outline-offset: 5px;
</style>
</head>
<body>
<div class="ex1">This div has a 4 pixels solid red outline 15 pixels outside the border edge.</div>
<br>
CSS Box Sizing ﻟﻌﻤﻞ ﻣﺮﺑﻊ ﺍﻭ ﺻﻨﺪﻭﻕ •
<!DOCTYPE html>
<html>
<head>
<style>
.div1 {
width: 300px;
height: 100px;
.div2 {
width: 300px;
height: 100px;
padding: 50px;
</style>
</head>
<body>
<br>
<div class="div2">This div is bigger (width is also 300px and height is 100px).</div>
</body>
ﻣﺛﺎﻝ ﺍﺧﺭ
<!DOCTYPE html>
<html>
<head>
<style>
.div1 {
width: 300px;
height: 100px;
box-sizing: border-box;
.div2 {
width: 300px;
height: 100px;
padding: 50px;
box-sizing: border-box;
</style>
</head>
<body>
<br>
<div class="div2">Hooray!</div>
<!DOCTYPE html>
ﻣﺛﺎﻝ ﺍﺧﺭ
<html>
<head>
<style>
body {
margin: 0;
*{
box-sizing: border-box;
input, textarea {
width: 100%;
</style>
</head>
<body>
<form action="/action_page.php">
First name:<br>
Last name:<br>
Comments:<br>
ﻭﺑﻬﺫﺍ ﻧﻛﻭﻥ ﻓﺩ ﺍﻧﺗﻬﻳﻧﺎ ﻣﻥ ﺷﺭﺡ ﻫﺫﺓ ﺍﻟﻭﺣﺩﺍﺕ ﺍﻟﻣﺿﺎﻓﺔ ﺍﻭ ﺍﻻﺿﺎﻓﺎﺕ ﺍﻟﺟﺩﻳﺩﺓ ﻓﻰ
ﻟﻐﺔ ﺍﻟـــ CSS3