sqrt()
CSS sqrt() funksiyasi sonning kvadrat ildizini qaytaradi.
Misol
Uchta <div> elementining kengligi va balandligini belgilash uchun calc() funksiyasi ichida sqrt() funksiyasidan foydalaning:
div.a {
width: calc(50px * sqrt(16)); /* 200px */
height: calc(50px * sqrt(9)); /* 150px */
background-color: salmon;
margin-bottom: 25px;
}
div.b {
width: calc(20px * sqrt(16)); /* 80px */
height: calc(20px * sqrt(9)); /* 60px */
background-color: green;
margin-bottom: 25px;
}
div.c {
width: calc(60px * sqrt(16)); /* 240px */
height: calc(60px * sqrt(9)); /* 180px */
background-color: maroon;
}
O‘zingiz sinab ko‘ring »
Brauzerlarda qo‘llab-quvvatlash
Jadvaldagi sonlar funksiyani to‘liq qo‘llab-quvvatlaydigan birinchi brauzer versiyasini ko‘rsatadi.
| Funksiya | |||||
|---|---|---|---|---|---|
| sqrt() | 120 | 120 | 118 | 15.4 | 106 |
CSS sintaksisi
sqrt(x)
| Qiymat | Tavsif |
|---|---|
| x | Majburiy. 0 dan katta yoki unga teng son |
| 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 sin() funksiyasi.
CSS ma’lumotnomasi: CSS tan() funksiyasi.
W3Schools Pathfinder
Yutuqlaringizni kuzating – bu bepul!
