mod()

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

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

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

Eslatma: Natija har doim bo‘luvchining ishorasini oladi.

Misol

Bir nechta mod() misollari:

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


Brauzerlarda qo‘llab-quvvatlash

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

Funksiya
mod() 125 125 118 15.4 111


CSS sintaksisi

mod(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 pow() funksiyasi.

CSS ma’lumotnomasi: CSS sin() funksiyasi.

CSS ma’lumotnomasi: CSS sqrt() funksiyasi.

CSS ma’lumotnomasi: CSS tan() funksiyasi.


W3Schools Pathfinder

Yutuqlaringizni kuzating – bu bepul!