شرح صفوف ومحتوى الفقرة
تحريك صورة الخلفية عن طريق إستخدام كلمات مفتاحية أفقياً ورأسياً تكون القيم من اليسار إلي اليمين:
- X القيمة الأولي موقع الصورة يميناً ويساراً.
- Y القيمة الثانية موقع الصورة لأعلي ولأسفل.
background-postion keywords:
[left top,left center,left bottom,right top,right center,right bottom,center top,center center,center bottom,left,center,right,top,bottom].
CSS Background Position right
موقع الصورة يمين عن طريق right keyword.
HTML
body
{
background-image:url('https://www.closetag.com/images/background.jpg');
background-repeat: no-repeat;
background-position: right;
}
CSS Background Position center
موقع الصورة في المنتصف عن طريق centerkeyword.
HTML
body
{
background-image:url('https://www.closetag.com/images/background.jpg');
background-repeat: no-repeat;
background-position: center;
}
CSS Background Position left
موقع الصورة في اليسار عن طريق left keyword.
HTML
body
{
background-image:url('https://www.closetag.com/images/background.jpg');
background-repeat: no-repeat;
background-position: left;
}
CSS Background Position right bottom
موقع الصورة في يميناً مع موقع الصورة في الأسفل عن طريق right bottom keyword.
HTML
body
{
background-image:url('https://www.closetag.com/images/background.jpg');
background-repeat: no-repeat;
background-position: right bottom;
height:800px;
}
CSS Background Position center bottom
موقع الصورة في بالأسفل مع موقع الصورة في المنتصف عن طريق center bottom keyword.
HTML
body
{
background-image:url('https://www.closetag.com/images/background.jpg');
background-repeat: no-repeat;
background-position: center bottom;
height:800px;
}