CSS Fon(background-attachment)

Odatiy bo'lib, `background-image` xususiyati rasmni gorizontal va vertikal ravishda takrorlaydi.

CSS Fon Biriktirilishi

CSS background-attachment

background-attachment xususiyati fon tasviri sahifa bilan birga aylanishi kerakmi yoki harakatsiz qolishi kerakmi (sahifaning qolgan qismi bilan aylanishi mumkin emas) ekanligini belgilaydi.

Misol Fon tasviri harakatsiz bo'lishi kerakligini belgilang:

body {
  background-image: url('img_tree.png');
  background-repeat: no-repeat;
  background-position: right top;
  background-attachment: fixed;
}

Misol Fon tasviri sahifa bilan birga aylanishi kerakligini belgilang:

body {
  background-image: url('img_tree.png');
  background-repeat: no-repeat;
  background-position: right top;
  background-attachment: scroll;
}

CSS background-attachment Xususiyati

XususiyatTavsif
background-attachmentFon tasviri harakatsiz yoki sahifa bilan birga aylanishini o'rnatadi

Ushbu sahifada

Xato haqida xabar berish