rem()

CSS rem() funksiyasi bir son (bo‘linuvchi) boshqa songa (bo‘luvchi) bo‘linganda qolgan qoldiqni qaytaradi.

Misol: rem(9, 2) = 1. (9 / 2 = 4; 4*2 = 8, qoldiq =1)

Misol: rem(9, -2) = 1. (9 / -2 = 4; 4*-2 = -8, qoldiq =-1)

Eslatma: Natija har doim bo‘luvchining ishorasini oladi.

Misol

Bir nechta rem() misollari:

line-height: rem(9, 2); /* 1 */ line-height: rem(19, 4); /* 3 */ line-height: rem(3.5, 3); /* 0.5 */ padding: rem(9%, 2%); /* 1% */ padding: rem(19px, 4px); /* 3px */ padding: rem(19rem, 4rem); /* 3rem */ rotate: rem(120deg, 25deg); /* 20deg */ rotate: rem(120deg, -25deg); /* -20deg */ rotate: rem(-90deg, 15deg); /* 0deg */ rotate: rem(-90deg, -15deg); /* 0deg */


Brauzerlarda qo‘llab-quvvatlash

Jadvaldagi sonlar funksiyani to‘liq qo‘llab-quvvatlaydigan birinchi brauzer versiyasini ko‘rsatadi.

Funksiya
rem() 125 125 118 15.4 111


CSS sintaksisi

rem(dividend, divisor)
Qiymat Tavsif
dividend Majburiy. divisorga bo‘linadigan qiymat (son, foiz yoki o‘lchamli qiymat)
divisor Ixtiyoriy. Bo‘luvchi (son, foiz yoki o‘lchamli qiymat)
Versiya: CSS4

Tegishli sahifalar

CSS ma’lumotnomasi: CSS acos() funksiyasi.

CSS ma’lumotnomasi: CSS asin() funksiyasi.

CSS ma’lumotnomasi: CSS atan() funksiyasi.

CSS ma’lumotnomasi: CSS atan2() funksiyasi.

CSS ma’lumotnomasi: CSS calc() funksiyasi.

CSS ma’lumotnomasi: CSS cos() funksiyasi.

CSS ma’lumotnomasi: CSS exp() funksiyasi.

CSS ma’lumotnomasi: CSS hypot() funksiyasi.

CSS ma’lumotnomasi: CSS log() funksiyasi.

CSS ma’lumotnomasi: CSS mod() funksiyasi.

CSS ma’lumotnomasi: CSS pow() funksiyasi.


W3Schools Pathfinder

Yutuqlaringizni kuzating – bu bepul!